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

Add support for editing messages with Limelight, where possible #446

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

AllegroFox
Copy link
Collaborator

@AllegroFox AllegroFox commented Oct 18, 2024

Uses window.postMessage to send message JSON to Limelight, allowing us to handle more message data than we can by encoding a URL. (github.io will truncate URLs after a certain length, which almost all of our messages exceed.)

So far I've only enabled this for Spotlights and Infobars in the production table, as these are the types of messages that Limelight currently knows about. We can incrementally add support for more templates to Limelight and add those templates to the SupportedTypes array, similarly to how we did for message preview.

Unfortunately window.postMessage requires exact URLs in order to work, so we won't be able to see this working in the deploy preview. I've tested it extensively locally though, and we can always just remove the links from the table if there are issues after landing.

Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for fxms-skylight ready!

Name Link
🔨 Latest commit f902127
🔍 Latest deploy log https://app.netlify.com/sites/fxms-skylight/deploys/672264af9bdd330008e7ecdd
😎 Deploy Preview https://deploy-preview-446--fxms-skylight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 6 from production)
Accessibility: 91 (🟢 up 2 from production)
Best Practices: 92 (🟢 up 9 from production)
SEO: 100 (🟢 up 10 from production)
PWA: -
View the detailed breakdown and full score reports

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

@AllegroFox AllegroFox changed the title Add support for editing messages with Limelight, where possible [WIP] Add support for editing messages with Limelight, where possible Oct 18, 2024
@AllegroFox AllegroFox changed the title [WIP] Add support for editing messages with Limelight, where possible Add support for editing messages with Limelight, where possible Oct 28, 2024
@AllegroFox AllegroFox requested review from dmose and sarahhjchung and removed request for dmose October 28, 2024 22:05
@dmose
Copy link
Member

dmose commented Oct 29, 2024

When I try to run this branch locally, I see this:

grafik

@AllegroFox
Copy link
Collaborator Author

@dmose Is it possible you've got some malformed JSON on your local? I'm only able to trigger that if I do something like remove the screens array from a message, or put a "spotlight" template on something that isn't a spotlight fr. ex.
I can wrap this function in a try/catch or something so that messages with wonky JSON don't generate edit links :)

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.

2 participants