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 static demo option #194

Merged
merged 2 commits into from
Oct 3, 2022
Merged

add static demo option #194

merged 2 commits into from
Oct 3, 2022

Conversation

NickyMeuleman
Copy link
Collaborator

@NickyMeuleman NickyMeuleman commented Oct 3, 2022

relates to #66 and #69

Untabled the idea after a long break.

This PR adds a way to get a static DEMO page.
Useful when developing a theme so the message you are styling doesn't scroll off the page by new ones being added.

Much simpler implementation this time around, no special parameter handling as one extra possibility for a query parameter doesn't require added complexity there.

When DEMO=static is passed, the demo page generates the number of messages specified by the showLatestMessages (always present as it's set to 100 if not explicitly specified) option immediately and does not add more.

Demo of workflow:
URL used: http://localhost:8080/c/showmychat?theme=advent-of-code&showLatestMessages=10&DEMO=static
changing the color of a mentioned user from red to blue
hQcKVVjdJz

Copy link
Owner

@BenDMyers BenDMyers left a comment

Choose a reason for hiding this comment

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

This looks great, and provides such a nice local experience. Thanks for this contribution, @NickyMeuleman! I've just got one little request for documentation, but then I'll be happy to merge this in!

src/docs/configuration.html Show resolved Hide resolved
@BenDMyers
Copy link
Owner

Great work, @NickyMeuleman! Merging in now.

@BenDMyers BenDMyers merged commit 57b0a79 into main Oct 3, 2022
@NickyMeuleman NickyMeuleman deleted the demo-static branch October 4, 2022 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants