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

Featured Items - Collection Page #575

Open
wants to merge 86 commits into
base: develop
Choose a base branch
from
Open

Conversation

g-saracca
Copy link
Contributor

@g-saracca g-saracca commented Dec 31, 2024

What this PR does / why we need it:

Add featured items section in the Collection Page.
Allows users that can edit a collection to create "featured items" that will initially support content and an optional image.
These "featured items" will be shown between the Collection page header and the items list.

Storybook links:

Which issue(s) this PR closes:

Special notes for your reviewer:

⚠️ This PR depends on backend issue 11124 that needs to be merged before merging this one.
⚠️ This PR depends on js-dataverse issue 235 that needs to be merged before merging this one.

Suggestions on how to test this:

Step 1: Run the Development Environment

  1. Execute npm i.
  2. Navigate with cd packages/design-system && npm i && npm run build.
  3. Return with cd ../../.
  4. Ensure you have a .env file similar to .env.example, with the variable VITE_DATAVERSE_BACKEND_URL=http://localhost:8000.
  5. Navigate with cd dev-env.
  6. Start the environment using ./run-env.sh 10943-featured-items.
  7. To verify the environment, visit http://localhost:8000 and check your local Dataverse installation.

Step 2: Test the feature

  1. Login and create a new collection or even in the root collection click the Edit Collection > Featured Items button.
  2. Create featured items, with different contents, with and without image and submit the form, change the order of the featured items by dragging them with the drag handle.
  3. Check that the featured items shown in the collection page are correct.
  4. Go to edit them again, replace images from a featured item, also you can test removing an image from a featured item and also remove a featured item by clicking the minus button. *Note: you can remove the first item, to be removed needs to be at least in the 2nd position.
  5. Check that the featured items shown in the collection page are correct.
  6. Go to edit them again but now try the delete all featured items action, when clicking it, a confirmation dialog will appear.
  7. Check in the collection page that no featured items are shown.
  8. About field validations: the content field cannot be empty and must be 15,000 characters or less, but note that if you enter "Hello world" in the field, this rich text editor will transform that into <p class="rte-paragraph">Hello world</p> so those html tags characters also count for the validation.
  9. You could also validate that if a collection is unpublished and has featured items, only users that can view unpublished collections can see the featured items.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Yes.
Screen Shot 2025-01-02 at 08 49 32
Screen Shot 2025-01-02 at 08 55 29
Screen Shot 2025-01-02 at 08 55 40

Is there a release notes update needed for this change?:

Additional documentation:

@g-saracca g-saracca added SPA.Q1 Not related to any specific Q1 feature Size: 10 A percentage of a sprint. 7 hours. Original size: 10 and removed Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 labels Jan 16, 2025
@g-saracca g-saracca marked this pull request as ready for review January 16, 2025 13:33
@ekraffmiller ekraffmiller self-assigned this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) GREI Re-arch GREI re-architecture-related integration Tasks involving the connection and interaction of UI features with the Dataverse API Original size: 10 Size: 10 A percentage of a sprint. 7 hours. SPA: Collection Page SPA.Q1 Not related to any specific Q1 feature SPA.Q4.5 Collections page with a more Website-like or CMS look and feel Waiting
Projects
Status: In Review 🔎
Development

Successfully merging this pull request may close these issues.

Featured Items - Collection Page
3 participants