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

feat: update create page flow according to design #325

Merged
merged 18 commits into from
Jul 19, 2024

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Jul 18, 2024

TL;DR

This PR introduces a new CreatePageModal component and updates the page creation flow. Deprecated modal components have been removed, and the new modal includes form validation, expected behavior, and animation effects for better UI/UX.

What changed?

  • Added CreatePageModal component that allows users to create new pages with options for layout, title, and URL.
  • Deprecated old page creation modal components such as PageCreateModal, LayoutSelection, etc.
  • Enhanced UI/UX with animated transitions using Motionbox.
  • Incorporated form validation to ensure correct input.
  • Updated schemas and services to support the new page creation logic.
  • Added Storybook stories to demonstrate the new page creation flow.
  • Refactored existing tests to align with the new components and removed redundant tests.

How to test?

  1. Open the application and navigate to the page creation section.
  2. Click on the 'Create new page' button.
  3. Follow the steps in the new modal to create a page (select layout, enter title, and URL).
  4. Check that the input validation works as expected.
  5. Verify that the page is created with the correct information.

Why make this change?

The existing page creation components were outdated and did not offer a smooth user experience. This new implementation provides a more intuitive interface with necessary validations and enhanced visuals, making it easier for users to create new pages.

tldr of this is that design changed

Copy link

vercel bot commented Jul 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
isomer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2024 8:02am

@karrui karrui changed the title feat: show layout screen and create default blob according to layout feat: update create page flow according to design Jul 18, 2024
@karrui karrui marked this pull request as ready for review July 18, 2024 08:52
@karrui karrui requested a review from a team as a code owner July 18, 2024 08:52
Copy link
Contributor

@seaerchin seaerchin left a comment

Choose a reason for hiding this comment

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

lgtm! please fix the as cast - using as const satisfies + removing the type provided works as expected.

some things i felt were done v well in this PR:

  1. doing the nitty gritty business logic stuff in the context and exposing wrappers to callers of the hook
  2. keeping each individual component "simple" code-wise (groupHover is pog) and exporting helper components to do 1 thing well (XMotionBox)
  3. i think we might be reusing the transformation logic (replacing non-alphanum to - and only when isDirty) - i feel that there's value in moving it out to a custom hook but i'm ok to do it later also. leave it to you ba

@karrui karrui force-pushed the move_some_page_metadata_into_resource branch from 4e5718b to f0a0ee6 Compare July 19, 2024 07:55
Base automatically changed from move_some_page_metadata_into_resource to main July 19, 2024 07:59
@karrui karrui force-pushed the update_create_flow_to_also_select_layout branch from ab6ceb7 to 8fc2856 Compare July 19, 2024 08:01
@karrui karrui merged commit de4412b into main Jul 19, 2024
15 of 19 checks passed
@karrui karrui deleted the update_create_flow_to_also_select_layout branch July 19, 2024 08:06
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.

2 participants