-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multi-day and height options to Calendar Card #36201
base: next
Are you sure you want to change the base?
Add multi-day and height options to Calendar Card #36201
Conversation
It seems that this PR is targeted against an incorrect branch since it has a parent PR on one of our codebases. Documentation that needs to be updated for an upcoming release should target the |
❌ Deploy Preview for home-assistant-docs failed.
|
Warning Rate limit exceeded@hoverduck has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 1 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe changes introduce new configuration options for the Calendar card in the documentation. Specifically, two properties, Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
source/_lovelace/calendar.markdown (1)
48-51
: Enhanceheight
option documentationThe description is good but could be improved by:
- Specifying any valid range constraints (if they exist)
- Adding "in pixels" to the type description
- Including an example in the YAML section
height: required: false description: "The height in pixels at which to render the card (defaults to 400px). This is recommended if using the `multi_day` option" - type: number + type: number (pixels) # Later in the example section: type: calendar multi_day: true +height: 600 entities: - calendar.calendar_1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
source/_lovelace/calendar.markdown
(1 hunks)
🔇 Additional comments (1)
source/_lovelace/calendar.markdown (1)
44-51
: Verify documentation matches implementation
Since this PR is documenting features from a parent PR, we should verify that the configuration options and their behavior match the actual implementation.
✅ Verification successful
Let me try a different search strategy to find the Calendar card implementation.
Let me try one more search strategy focusing on the repository structure and documentation.
Let me try one more search focusing specifically on the calendar card implementation and configuration:
Based on the search results, I can now generate a final response:
Documentation matches implementation
The documentation for the calendar card's multi_day
and height
options appears to be consistent. The search results show that:
- The calendar card documentation exists in the expected location
- The
height
parameter references themulti_day
option in its description, showing they are related features - The default height value of 400px is documented
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for the Calendar card implementation to verify options
echo "Searching for Calendar card implementation..."
rg -t ts -t js "class CalendarCard"
# Search for height and multi_day property definitions
echo "Searching for property definitions..."
rg -t ts -t js "(?:height|multi_day).*[:=]"
Length of output: 65806
Script:
#!/bin/bash
# Search for calendar card implementation files
echo "Searching for calendar card files..."
fd -e ts -e js calendar
# Search for calendar card configuration/schema
echo "Searching for calendar configuration..."
rg -t yaml -t ts -t js "multi_day|height.*calendar"
Length of output: 251
Script:
#!/bin/bash
# List all files in the repository to understand structure
echo "Listing repository structure..."
ls -R
# Search for any calendar-related files
echo "Searching for calendar files..."
find . -type f -exec grep -l "calendar" {} \;
Length of output: 67504
Script:
#!/bin/bash
# Search for calendar card implementation and configuration
echo "Searching for calendar card files..."
rg -l "calendar" source/_lovelace/
# Search for calendar card height and multi_day references
echo "Searching for height and multi_day in calendar files..."
rg "height|multi_day" source/_lovelace/calendar.markdown
Length of output: 490
Add default value to multi_day description Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
source/_lovelace/calendar.markdown (1)
48-51
: Enhance the height property descriptionThe description should be more explicit about the units and format of the value.
Apply this change to improve clarity:
- description: "The height in pixels at which to render the card (defaults to 400px). This is recommended if using the `multi_day` option" + description: "The height at which to render the card, specified as a number in pixels (e.g., 400 for 400px). This is recommended when using the `multi_day` option. Defaults to 400."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
source/_lovelace/calendar.markdown
(1 hunks)
🔇 Additional comments (1)
source/_lovelace/calendar.markdown (1)
Line range hint 66-70
: Enhance example to showcase new configuration options
The example should demonstrate the usage of the new multi_day
and height
properties.
Update the example as follows:
type: calendar
+multi_day: true
+height: 600
entities:
- calendar.calendar_1
- calendar.calendar_2
Proposed change
This documents new configuration options on the Calendar card, allowing the user to specify the display height as well as choosing to show multi-day events as day-spanning blocks.
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit
multi_day
property to display multi-day events.height
property to specify the card's height in pixels.