fix(bookmark): show app name loading state - #5111
Conversation
🦋 Changeset detectedLatest commit: 13c2ed8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
4472530 to
40a2ed4
Compare
40a2ed4 to
5bf4aea
Compare
🔍 Security review — external contributorSince this PR comes from an unfamiliar external contributor (fork PR), I ran an extensive supply-chain and code-level security check before doing anything else. Contributor signal
Diff scope (9 files, +93/-7)
Checks performed
Verdict✅ No security concerns identified. The change is a small, self-contained UI/accessibility fix with no new attack surface. Safe to proceed with normal review. UpdateRebased this branch onto latest |
5bf4aea to
82507d1
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves the Edit Bookmark modal UX in @equinor/fusion-framework-react-components-bookmark by making app-manifest resolution explicit: the app name field now shows a loading indicator while the manifest request is pending, and swaps to the resolved display name once available.
Changes:
- Add
AppNameFieldto render a read-only app name input witharia-busyand an EDS circular progress indicator during pending state. - Update
EditBookmarkModalto compute a preciseisAppNameLoadingcondition based on bookmark/provider presence, unresolved value, and no request error. - Introduce package-level Vitest setup (config + script) and a unit test for the loading/resolved rendering contract; include README + changeset updates.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Locks the added Vitest dev dependency for the workspace. |
| packages/react/components/bookmark/vitest.config.ts | Adds a Vitest project config for the bookmark components package. |
| packages/react/components/bookmark/tsconfig.json | Excludes test files from the build TypeScript project. |
| packages/react/components/bookmark/src/components/edit-bookmark/EditBookmarkModal.tsx | Computes manifest-loading state and swaps the raw Input for AppNameField. |
| packages/react/components/bookmark/src/components/edit-bookmark/AppNameField.tsx | New component that renders the app name field with loading adornment + accessibility attributes. |
| packages/react/components/bookmark/src/tests/AppNameField.test.tsx | Adds tests validating loading indicator + resolved rendering behavior. |
| packages/react/components/bookmark/README.md | Documents loading feedback behavior in the edit modal feature list. |
| packages/react/components/bookmark/package.json | Adds vitest devDependency and a test script for the package. |
| .changeset/react-components-bookmark_app-loading.md | Patch changeset describing the user-facing loading feedback improvement. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Why is this change needed?
The Edit Bookmark modal leaves the read-only app name field blank while the app manifest is being resolved. That makes a normal asynchronous wait look like missing data.
What is the current behavior?
The modal requests the app manifest and eventually fills in its display name, but it provides no loading feedback while that request is pending.
What is the new behavior?
The app name field now displays an EDS circular progress indicator while the manifest request is pending. The resolved display name replaces it when available. The field also exposes its busy state and an accessible loading label.
What is the intended behavior or invariant?
Loading is reported only after both the bookmark and app provider exist, while the manifest value is unresolved and no request error has occurred. A missing provider or failed request must not leave the field permanently busy.
Does this PR introduce a breaking change?
No.
Impact assessment:
@equinor/fusion-framework-react-components-bookmark.Review guidance:
Please focus on the pending-state condition in
EditBookmark.tsxand the loading/resolved rendering contract inAppNameField.Validation completed:
aria-busyand the progress labelAdditional context
The implementation uses the existing EDS
Inputadornment andProgress.Circularcomponents, so it adds no runtime dependency. A patch changeset and package README update are included.The repository-wide
pnpm -w checkcould not be used as a clean signal on this Windows checkout because it reports existing CRLF formatting across untouched files and a Biome configuration version mismatch. The changed TypeScript files pass a scoped Biome check and were not used to reformat unrelated files.Related issues
closes: #5092
Checklist