Skip to content

[Storybook] Improve Storybook examples #600

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

Merged
merged 5 commits into from
Mar 17, 2025
Merged

[Storybook] Improve Storybook examples #600

merged 5 commits into from
Mar 17, 2025

Conversation

slax57
Copy link
Contributor

@slax57 slax57 commented Mar 6, 2025

Problem

This PR is part of a greater effort to improve the documentation on the Admin part of the API Platform framework.
This PR will serve as a reference for code examples and screenshots featured in an upcoming PR to the documentation repo (api-platform/docs#2141).

Currently, the example Admin Apps in the Storybook are very basic, and do not allow to grasp the power of API Platform + React Admin.

Solution

This PR adds the following:

  • New Book and Review entities, that leverage validation, realtime, relationship, ordering, filtering and default representation
  • A new story called UsingGuessers that shows the customization made possible by only leveraging the API Platform Admin Components (i.e. the Guessers)
  • A new story called AdvancedCustomization that shows the customization made possible by also leveraging React Admin Components

How to test

  1. Run the Storybook: docker compose up
  2. Accept self-signed certificate by browsing https://localhost
  3. Play with the Basic story: http://localhost:3000/?path=/story/admin-basic--admin
  4. Play with the UsingGuessers story: http://localhost:3000/?path=/story/admin-custom-usingguessers--using-guessers
  5. Play with the AdvancedCustomization story: http://localhost:3000/?path=/story/admin-custom-advancedcustomization--advanced-customization

Screenshots

image

image

image

image

@slax57 slax57 marked this pull request as ready for review March 14, 2025 18:20
@djhi djhi self-requested a review March 17, 2025 10:15
@djhi djhi merged commit 590ba9c into main Mar 17, 2025
4 checks passed
@slax57 slax57 added this to the 4.0.7 milestone May 16, 2025
@slax57 slax57 deleted the improve-storybook branch May 16, 2025 10:05
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy