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(route): Add Sidebar examples page & stories, resolving #53 #56 #69

Merged
merged 5 commits into from
May 2, 2022

Conversation

tulup-conner
Copy link
Collaborator

@tulup-conner tulup-conner commented Apr 29, 2022

Adds the following examples for Sidebars:

  • Default sidebar
  • Multi-level dropdown
  • Content separator

The following can't be finished yet, because the
component needs work:

  • CTA button
  • Logo branding

Once #72 is accepted I can finalize this PR.

This resolves #53.

Also adds Storybook stories for Sidebar, resolving #56.

@tulup-conner tulup-conner force-pushed the feature/add-sidebar-page branch 3 times, most recently from da905aa to 1e8209c Compare May 1, 2022 00:11
tulup-conner added a commit to tulup-conner/flowbite-react that referenced this pull request May 1, 2022
`storybook` provides a `decorators` object to let
us wrap components rendered in `storybook` with
some HTML.

This change wraps every component in a centered
flex box which is a nicer UX than the top left.

It also adds `MemoryRouter` which is required to
merge themesberg#69.
@tulup-conner tulup-conner changed the title feat(route): Add Sidebar examples page feat(route): Add Sidebar examples page & stories May 1, 2022
@tulup-conner tulup-conner marked this pull request as ready for review May 1, 2022 18:50
@tulup-conner tulup-conner changed the title feat(route): Add Sidebar examples page & stories feat(route): Add Sidebar examples page & stories, resolving #53 #56 May 1, 2022
@tulup-conner tulup-conner force-pushed the feature/add-sidebar-page branch from 1cb513b to cfaa041 Compare May 2, 2022 03:22
@tulup-conner
Copy link
Collaborator Author

This branch is up to date now and ready to merge instantly. I didn't consider this consequence of tying it to the other PR, sorry about that.

src/pages/SidebarPage.tsx Outdated Show resolved Hide resolved
rluders pushed a commit that referenced this pull request May 2, 2022
* chore(deps): Remove `@popperjs/core`

* chore(deps): Install `@floating-ui/react-*`

These packages replaces `@popperjs/*`.

* refactor(component): Upgrade `Tooltip` to `@floating-ui/react-*`

Replaces `@popperjs/*`.

refactor(component): Re-enable `Tooltip` trigger either `click` or `hover`

refactor(component): Re-enable `Tooltip` arrow

refactor(component): Re-enable Tooltip auto placement

refactor(component): Re-enable `Tooltip` transitions

fix(component): Undo effect requiring arrow in `Tooltip`

`Tooltip`s should be able to be created without
using the arrow.

fix(component): Overlap `Tooltip` arrow with text via `z-index`

Prevents the text inside a `Tooltip` from being
obscured by the `Tooltip` arrow.

fix(component): Resolve `Tooltip` arrow placement when `placement` = `auto`

Retrieves the actual placement calculated by
`floating-ui` from the hook. This is crucial when
the component is created with `auto` placement.

* fix(component): Resolve #57

Inside `storybook`, `Tooltip`s were misaligned from
the parent element on `Chromium` browsers.

* refactor(component): Replace simple `if/else` by ternary

* refactor(story): Update `storybook` wrapper

`storybook` provides a `decorators` object to let
us wrap components rendered in `storybook` with
some HTML.

This change wraps every component in a centered
flex box which is a nicer UX than the top left.

It also adds `MemoryRouter` which is required to
merge #69.
Adds the following examples for `Sidebar`s:

- [x] Default sidebar
- [x] Multi-level dropdown
- [x] Content separator
- [x] CTA button
- [x] Logo branding
The `Sidebar` is not highly configurable at the root
component, but there are a number of ways to set up
the contents, so we added those examples.
Creating a component to reuse the code between
`storybook` and the page caused the page to display
the shortcut component instead of the actual
component's code.
@tulup-conner tulup-conner force-pushed the feature/add-sidebar-page branch 2 times, most recently from 880b29a to d96fe4e Compare May 2, 2022 08:38
@tulup-conner tulup-conner force-pushed the feature/add-sidebar-page branch from d96fe4e to 96e9805 Compare May 2, 2022 08:39
@bacali95 bacali95 merged commit 38b86bd into themesberg:main May 2, 2022
@tulup-conner tulup-conner deleted the feature/add-sidebar-page branch May 3, 2022 02:42
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.

Create Sidebar page
2 participants