Skip to content

@W-19434936@ feat: add performance mode flag#492

Closed
bpbuch wants to merge 4 commits into
mainfrom
bbuchanan/performance-mode
Closed

@W-19434936@ feat: add performance mode flag#492
bpbuch wants to merge 4 commits into
mainfrom
bbuchanan/performance-mode

Conversation

@bpbuch

@bpbuch bpbuch commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

Adding a flag to support launching component preview into performance mode

What issues does this PR fix or reference?

@W-19434936@

@bpbuch bpbuch self-assigned this Aug 26, 2025
@bpbuch bpbuch requested review from a team as code owners August 26, 2025 19:17
Comment thread test/shared/previewUtils.test.ts

Launch component preview without selecting a component

# flags.performance.summary

@lesya7 lesya7 Aug 26, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What if I don't pass the "performance" flag? Would I be able to see the "performance" link by clicking on the "Performance" link?

@bpbuch bpbuch Aug 26, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. The same operation is available in the header of the default page in the preview application.

This flag would save the user the extra step of navigating into "performance" mode" if that is their target destination.


# flags.performance.summary

Open the component preview in performance mode

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In the short term, I would prefer to not codify performance mode in the CLI flags. I'm not in love with the name for performance mode and I don't know that its intuitive why I would run in performance mode vs not. This seems like more of an app metadata conversation - if we are previewing a root component for an app, we should show the preview in full screen mode.

Would you be ok with just using an environment variable for now (which would still allow us to support the hackathon)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm open to other names for the flag. This name stems from the nav item in the header of the default application page(which can also change). cc @marcelinollano

I believe the CLI should be able to perform the same actions as the default application view. Today, the CLI can launch into the preview application with and without a selected component, but it cannot launch into the "performance" view.

I agree the naming is a bit unintuitive, but there is value in being able to preview a component without the "preview application chrome", especially for large components.

@bpbuch bpbuch closed this Sep 8, 2025
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