X Tutup
Skip to content

Calendar: Add slotDuration and slotLabelInterval, Add Day View#8880

Open
BeatLink wants to merge 17 commits intoTriliumNext:mainfrom
BeatLink:main
Open

Calendar: Add slotDuration and slotLabelInterval, Add Day View#8880
BeatLink wants to merge 17 commits intoTriliumNext:mainfrom
BeatLink:main

Conversation

@BeatLink
Copy link
Contributor

@BeatLink BeatLink commented Mar 2, 2026

This PR allows the user to set the FullCalendar slotDuration and slotLabelInterval attributes using note labels on the calendar.

This PR also adds day view as a selectable option

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 2, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the calendar widget by providing users with greater control over its time-based display. It enables dynamic configuration of time slot durations and label intervals directly through note labels, making the calendar more adaptable to various scheduling needs. This change improves the flexibility and user experience of the calendar feature without altering its core functionality.

Highlights

  • Calendar Customization: Introduced new note labels, calendar:slotDuration and calendar:slotLabelInterval, allowing users to customize the duration of time slots and the interval at which labels appear in the FullCalendar view.
  • Documentation Update: Updated the user guide to include comprehensive documentation for the newly added slotDuration and slotLabelInterval note labels, complete with usage examples.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • apps/client/src/widgets/collections/calendar/index.tsx
    • Introduced slotDuration and slotLabelInterval state variables, initialized from useNoteLabel hooks.
    • Passed slotDuration and slotLabelInterval as props to the FullCalendar component, providing default values of '00:30:00' and '01:00:00' respectively.
  • docs/User Guide/User Guide/Collections/Calendar.md
    • Added new entries for #calendar:slotDuration and #calendar:slotLabelInterval to the calendar attributes table.
    • Provided detailed descriptions and examples for configuring time slot duration and label intervals.
    • Slightly reformatted the HTML table structure for improved readability.
Activity
  • Pull request created by BeatLink to add slotDuration and slotLabelInterval to Calendar.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces slotDuration and slotLabelInterval attributes to the Calendar view, allowing users to configure them through note labels. The implementation is sound, and the documentation has been updated accordingly. My review includes suggestions to improve code maintainability by extracting hardcoded default values into constants, and to enhance the documentation by adding information about these default values and ensuring consistent formatting.

@BeatLink
Copy link
Contributor Author

BeatLink commented Mar 2, 2026

@gemini-code-assist review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the ability to configure slotDuration and slotLabelInterval for the calendar view using note labels. The implementation is straightforward and follows existing patterns. I've identified a potential bug where an empty label value would be passed to the calendar component, which could cause issues. I've included a suggestion to fix this. I also have a minor suggestion for improving code organization.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully adds the slotDuration and slotLabelInterval attributes to the Calendar widget, allowing users to customize these FullCalendar properties via note labels. The changes include defining default constants, retrieving values from note labels, passing them to the FullCalendar component, updating the Labels type for type safety, and documenting the new attributes in the user guide.

BeatLink and others added 3 commits March 3, 2026 07:45
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@BeatLink
Copy link
Contributor Author

BeatLink commented Mar 3, 2026

@eliandoran can you take a look?

@BeatLink
Copy link
Contributor Author

BeatLink commented Mar 7, 2026

@eliandoran @SiriusXT could we get this in for the next release?

@BeatLink BeatLink changed the title Add slotDuration and slotLabelInterval to Calendar Calendar: Add slotDuration and slotLabelInterval, Add Day View Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

X Tutup