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

Support adding pages #73

Merged
merged 8 commits into from
Dec 29, 2022
Merged

Support adding pages #73

merged 8 commits into from
Dec 29, 2022

Conversation

nmanu1
Copy link
Contributor

@nmanu1 nmanu1 commented Dec 27, 2022

This PR adds support for adding new pages through the UI and saving them in the store via a new addPage action. The UI is also updated to display a list of the pages and it allows you to click on the names to switch between them. This PR also makes other changes that are described in the page operations tech design:

  • removes setPages from the PageSliceActions
  • fixes a bug in setActivePageName
  • adds a new pendingChanges section of PageSliceStates with pagesToUpdate
  • updates setActivePageState and setActiveComponentProps to update the pagesToUpdate

J=SLAP-2498
TEST=auto, manual

See that the new and existing Jest tests pass. In the test-site, see that clicking the button for adding a page causes a modal to appear. Only valid page names are accepted and actually create a page.

Screen.Recording.mov

@nmanu1 nmanu1 requested a review from a team December 27, 2022 19:39
packages/studio-plugin/src/types/StudioPaths.ts Outdated Show resolved Hide resolved
packages/studio/src/components/AddPageButton.tsx Outdated Show resolved Hide resolved
packages/studio/src/components/AddPageButton.tsx Outdated Show resolved Hide resolved
packages/studio/src/store/slices/createPageSlice.ts Outdated Show resolved Hide resolved
packages/studio/src/store/slices/createPageSlice.ts Outdated Show resolved Hide resolved
packages/studio/src/components/AddPageButton.tsx Outdated Show resolved Hide resolved
packages/studio/src/components/AddPageButton.tsx Outdated Show resolved Hide resolved
@nmanu1 nmanu1 requested a review from yen-tt December 28, 2022 20:38
@nmanu1 nmanu1 requested a review from a team December 29, 2022 16:17
@nmanu1 nmanu1 merged commit bc7500a into main Dec 29, 2022
@nmanu1 nmanu1 deleted the dev/add-page branch December 29, 2022 16:51
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.

None yet

4 participants