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

[Cloudflare] New Demo Mode #2668

Closed
wants to merge 4 commits into from
Closed

[Cloudflare] New Demo Mode #2668

wants to merge 4 commits into from

Conversation

adamgall
Copy link
Member

@adamgall adamgall commented Jan 14, 2025

Since we no longer have a dedicated "demo" environment in Cloudflare (all "non production environments" are the same), we need a new way to use Demo Mode.

This PR is an answer to that.

It's implemented via a demo_mode query param.

Please append the demo_mode=on query param to a url in the URL bar to "turn on" demo mode for any deployment.

Ex:

Also includes a button in the footer to turn it off, if it's on.

This PR also removes the isDevMode() functionality from the codebase. If this is being used on any @decentdao/engineering machines let me know and we can add it back in.

Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for decent-interface-dev ready!

Name Link
🔨 Latest commit 33d777f
🔍 Latest deploy log https://app.netlify.com/sites/decent-interface-dev/deploys/6787d23520046c00076a5e45
😎 Deploy Preview https://deploy-preview-2668.app.dev.decentdao.org
📱 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.

Copy link

cloudflare-workers-and-pages bot commented Jan 14, 2025

Deploying decent-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: 33d777f
Status: ✅  Deploy successful!
Preview URL: https://85aeb14c.decent-interface.pages.dev
Branch Preview URL: https://cf-new-demo-mode.decent-interface.pages.dev

View logs

@adamgall adamgall force-pushed the cf/cloudflare-functions-client branch from 0cf5ffa to 96cc865 Compare January 14, 2025 08:43
Copy link
Contributor

Choose a reason for hiding this comment

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

I sense the beginnings of an expansion of John's feature flag work in this file to account for persistence. If true, I likey.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yo this is dope now check it out

@adamgall adamgall force-pushed the cf/cloudflare-functions-client branch from 96cc865 to bc8c422 Compare January 14, 2025 15:42
Copy link
Contributor

@johnqh johnqh left a comment

Choose a reason for hiding this comment

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

How about wait for #2648 and just use VITE_APP_FLAG_DEMO_MODE=ON for param?

Base automatically changed from cf/cloudflare-functions-client to cloudflare January 15, 2025 00:53
@adamgall
Copy link
Member Author

How about wait for #2648 and just use VITE_APP_FLAG_DEMO_MODE=ON for param?

@johnqh not sure I follow your suggestion here.

My own preference would be to continue merging this as-is (apart from any PR review of course), so that we don't lose the ability for Parker to give demos, and then deal with the merge conflicts from #2648 when they happen.

src/hooks/utils/modes.tsx Outdated Show resolved Hide resolved
src/hooks/utils/modes.tsx Outdated Show resolved Hide resolved
src/hooks/utils/modes.tsx Show resolved Hide resolved
src/hooks/utils/modes.tsx Outdated Show resolved Hide resolved
@adamgall
Copy link
Member Author

adamgall commented Jan 15, 2025

@johnqh after spending some more time with your Feature Flag PR (see #2648) and doing my own little building on top of it (see #2673), I'm totally willing to close this PR.

@adamgall adamgall closed this Jan 15, 2025
@adamgall adamgall deleted the cf/new-demo-mode branch January 16, 2025 02:34
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.

3 participants