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

Preview: Simplify docsMode #18729

Merged
merged 6 commits into from
Jul 18, 2022
Merged

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Jul 18, 2022

Telescoping on #18728

What I did

  • When in docs mode, only add entries of type docs from the index
  • This massively simplifies all other logic so we can delete other code (also we don't need to mess with layout as docs entries will never show the toolbar etc)
  • Also try and clean up references to the DOCS_MODE global and instead use props from the provider

How to test

Run react-ts in docs mode and without.

We don't have any e2e tests for docs mode at this stage 😞

@tmeasday tmeasday added maintenance User-facing maintenance tasks addon: docs labels Jul 18, 2022
@tmeasday tmeasday requested review from shilman and ndelangen July 18, 2022 02:15
@nx-cloud
Copy link

nx-cloud bot commented Jul 18, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit efea215. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

},
layout: {
initialActive: ActiveTabs.CANVAS,
showToolbar: !DOCS_MODE,
showToolbar: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

The toolbar will hide automatically as all entries are docs

Comment on lines -197 to -200
if (DOCS_MODE) {
api.jumpToComponent(direction);
return;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This happens naturally as all entries are docs, we don't have to skip over any.

@@ -10,7 +10,6 @@ beforeEach(() => {
currentState = {
ui: {
enableShortcuts: true,
docsMode: false,
Copy link
Member Author

Choose a reason for hiding this comment

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

We weren't using this

Base automatically changed from export-other-constants-for-manager to future/base July 18, 2022 12:03
@yannbf yannbf self-requested a review July 18, 2022 14:40
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Great change! 🎉

@shilman shilman changed the title Simplify docsMode Preview: Simplify docsMode Jul 18, 2022
@shilman shilman merged commit 514d025 into future/base Jul 18, 2022
@shilman shilman deleted the tom/sb-327-ui-sort-out-docs_mode branch July 18, 2022 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: docs maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants