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: introduce new help overlay for add section button #1515

Merged
merged 6 commits into from
Sep 21, 2023

Conversation

dcshzj
Copy link
Contributor

@dcshzj dcshzj commented Sep 21, 2023

Problem

The add section button does not have the ability to show a help overlay.

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
  • No - this PR is backwards compatible

Features:

  • The add section button now has a new help overlay component, which allows a popover to appear on the right side of the option upon hover.
  • The Editable component is also promoted to a shared component, and stories were added for the AddSectionButton to showcase the new help overlay.

Before & After Screenshots

BEFORE:

Screenshot 2023-09-21 at 11 39 27 AM

AFTER:

Screenshot 2023-09-21 at 11 59 28 AM

Tests

  • Unit tests (using npm run tests)
  • e2e tests (comment on this PR with the text !run e2e)
  • Smoke tests
    • Run the storybook and navigate to components/AddSectionButton
    • Ensure that the help overlay appears for text cards, info-columns and announcements
    • Navigate to any site
    • Ensure that there are no regressions in the Editable functionality (dnd, accordion, etc) for homepage, contact us and navigation bar pages

Deploy Notes

None

@dcshzj dcshzj requested a review from a team September 21, 2023 03:43
@dcshzj
Copy link
Contributor Author

dcshzj commented Sep 21, 2023

!run chromatic

@dcshzj dcshzj temporarily deployed to staging September 21, 2023 03:52 — with GitHub Actions Inactive
@dcshzj dcshzj temporarily deployed to staging September 21, 2023 03:56 — with GitHub Actions Inactive
@dcshzj
Copy link
Contributor Author

dcshzj commented Sep 21, 2023

!run chromatic

@dcshzj dcshzj temporarily deployed to staging September 21, 2023 04:12 — with GitHub Actions Inactive
@dcshzj dcshzj requested a review from sehyunidaaa September 21, 2023 04:19
@dcshzj
Copy link
Contributor Author

dcshzj commented Sep 21, 2023

Copy link
Contributor

@kishore03109 kishore03109 left a comment

Choose a reason for hiding this comment

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

Approving since my comments are non-functional.
I do think think the storybook code can be made a lot neater for extensibility in the future

Biz logic wise lgtm

component: AddSectionButton,
} as Meta<typeof AddSectionButton>

interface AddSectionButtonTemplateArgs {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, what are your thoughts on creating an object interface for each card, then passing in an array?
This way we can

  1. easily extend in the future if needed
  2. less verbose code
  3. Guarantee each object has the same shape in one glance

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adjusted in b688a48! I think I got a little carried away here oops.

@dcshzj dcshzj temporarily deployed to staging September 21, 2023 07:19 — with GitHub Actions Inactive
@dcshzj dcshzj merged commit dcedd36 into develop Sep 21, 2023
6 checks passed
@mergify mergify bot deleted the feat/addsectionbutton-help-overlay branch September 21, 2023 11:22
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