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

fix: update the message on mode selection dropdown. #4881

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

Conversation

victorchrollo14
Copy link
Contributor

Description

fixes issue #4626

added a function that returns the default message after checking what all modes are enabled, if both the content mode and design mode is enabled then we display "Select Design or Content mode", if content mode is disabled then we display "Select Design mode" ie in the share page where links generated by free users has the content mode disabled.

but the function doesn't handle a case where both the content and design mode are disabled, since there didn't seem to be any scenario where both are disabled. in such a scenario we should probably just hide the drop down menu that let users select content or design mode.

Steps for reproduction

  1. set USER_PLAN to empty string in env.
  2. then generate a share link on the builder page.
  3. open the share link and you can the see message is "Select Design mode" in mode selection dropdown, since only design mode is enabled and content mode is disabled.

Code Review

  • hi @kof, I need you to do
    • conceptual review ( feature-correctness)
    • detailed review (read every line)
    • test it on preview

Before requesting a review

  • made a self-review
  • added inline comments where things may be not obvious (the "why", not "what")

Before merging

  • tested locally and on preview environment (preview dev login: 0000)
  • updated test cases document
  • added tests
  • if any new env variables are added, added them to .env file

@victorchrollo14 victorchrollo14 changed the title update the message on mode selection dropdown. fix: update the message on mode selection dropdown. Feb 16, 2025
@TrySound TrySound requested a review from kof February 16, 2025 09:26
@kof kof requested review from istarkov and removed request for kof February 16, 2025 10:08
@istarkov
Copy link
Member

istarkov commented Mar 4, 2025

Seems like no reason to show select at all in such situation?
cc @kof
image

@kof
Copy link
Member

kof commented Mar 4, 2025

Seems like no reason to show select at all in such situation?

agree

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