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

Fix/489 dynamic root alias #530

Merged
merged 23 commits into from
Nov 4, 2024
Merged

Fix/489 dynamic root alias #530

merged 23 commits into from
Nov 4, 2024

Conversation

ekraffmiller
Copy link
Contributor

@ekraffmiller ekraffmiller commented Oct 26, 2024

What this PR does / why we need it:

This PR removes the use of 'root' as a constant to refer to the alias of the root collection. Instead, it depends on js-dataverse to use the default root collection id, ':root' to get the root collection.

Which issue(s) this PR closes:

Special notes for your reviewer:

The logic for handling the loading state of the Collection in Account.tsx and LoggedInHeaderActions.tsx needs a closer review, I wasn't sure the best way to handle the isLoading state.

Suggestions on how to test this:

Step 1: Run the Development Environment

  1. Execute npm i.
  2. Navigate with cd packages/design-system && 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 unstable.
  7. To verify the environment, visit http://localhost:8000 and check your local Dataverse installation.

Step 2: Test the feature

  1. In the SPA test that the Create Dataset and Create Collection features work from the root collection, and subcollections.
  2. In JSF, login ad Dataverse Admin and. go to the root collection. Choose Edit -> General Information. In the edit form, change the Identifier from 'root' to another alias. Also change the Dataverse Name from 'Root' to something else.
  3. In the SPA, from the HomePage click 'Browse Collections'. The new name and alias of the root collection should appear on the Collections page. Test that you can Create a Dataset and a Collection from this page.
  4. From the Header, test that you Create a Dataset and a Collection.
  5. Go to the Accounts Page check that the Breadcrumb has been removed from the page

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

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

Additional documentation:

@coveralls
Copy link

coveralls commented Oct 26, 2024

Coverage Status

coverage: 97.572% (+0.2%) from 97.371%
when pulling c15d083 on fix/489-dynamic-root-alias
into 8b59a48 on develop.

@ekraffmiller ekraffmiller marked this pull request as ready for review October 30, 2024 12:46
@ekraffmiller ekraffmiller added SPA.Q4 Not related to any specific Q4 feature SPA.Q4.10 Resolve TODOs and tech debt Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 GREI Re-arch GREI re-architecture-related FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) labels Oct 30, 2024
@g-saracca g-saracca assigned g-saracca and ekraffmiller and unassigned g-saracca Oct 31, 2024
Copy link
Contributor

@g-saracca g-saracca left a comment

Choose a reason for hiding this comment

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

I’ve tested this in my local environment and it works great! 🎉
Nice work @ekraffmiller, this is a very nice addition to the SPA!
I just left some minor improvements that could be done.

package.json Outdated Show resolved Hide resolved
src/sections/account/Account.module.scss Outdated Show resolved Hide resolved
src/sections/create-collection/CreateCollectionFactory.tsx Outdated Show resolved Hide resolved
src/sections/create-dataset/CreateDatasetFactory.tsx Outdated Show resolved Hide resolved
src/sections/layout/header/HeaderFactory.tsx Show resolved Hide resolved
src/sections/layout/header/LoggedInHeaderActions.tsx Outdated Show resolved Hide resolved
src/sections/Route.enum.ts Outdated Show resolved Hide resolved
@ekraffmiller ekraffmiller removed their assignment Nov 4, 2024
@ekraffmiller ekraffmiller removed their assignment Nov 4, 2024
@g-saracca g-saracca removed their assignment Nov 4, 2024
@ofahimIQSS ofahimIQSS self-assigned this Nov 4, 2024
@ofahimIQSS
Copy link
Contributor

Tested locally - everything looks good. Did additional regression test on storybook (no issues there).
Testing of 530.docx

@ofahimIQSS ofahimIQSS merged commit 110d696 into develop Nov 4, 2024
10 of 14 checks passed
@ofahimIQSS ofahimIQSS deleted the fix/489-dynamic-root-alias branch November 4, 2024 16:40
@ofahimIQSS ofahimIQSS removed their assignment Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q4 Not related to any specific Q4 feature SPA.Q4.10 Resolve TODOs and tech debt
Projects
Status: Done 🧹
Development

Successfully merging this pull request may close these issues.

Support dynamic alias for the root collection
4 participants