Skip to content
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

Open Record Card on Calendar event click #122

Merged
merged 5 commits into from
Feb 12, 2024
Merged

Conversation

georgegevoian
Copy link
Contributor

New test will fail temporarily until the Grist image is updated with support for opening a Record Card from a custom widget.

Copy link

netlify bot commented Jan 16, 2024

Deploy Preview for boisterous-sunburst-a5c941 ready!

Name Link
🔨 Latest commit 37af2bb
🔍 Latest deploy log https://app.netlify.com/sites/boisterous-sunburst-a5c941/deploys/65c957ec1faac9000810e611
😎 Deploy Preview https://deploy-preview-122--boisterous-sunburst-a5c941.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@georgegevoian georgegevoian changed the title Open Record Card on Calendar event click (WIP) Open Record Card on Calendar event click Jan 30, 2024
Copy link
Contributor

@berhalak berhalak left a comment

Choose a reason for hiding this comment

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

Thanks, one question only.

@@ -218,6 +218,7 @@ class CalendarHandler {
TZDate = this.calendar.getDate().constructor;

this.calendar.on('clickEvent', async (info) => {
focusWidget();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this, the calendar widget doesn't get focus if you click or double-click an event. This breaks the new viewAsCard command because it opens the selected record in the active section, and if the calendar isn't the active section, the wrong record is shown in the popup.

@georgegevoian georgegevoian merged commit 39ad886 into master Feb 12, 2024
2 checks passed
@georgegevoian georgegevoian deleted the calendar-record-cards branch February 12, 2024 13:52
jperon pushed a commit to jperon/grist-widget that referenced this pull request Feb 14, 2024
jperon pushed a commit to jperon/grist-widget that referenced this pull request Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants