Skip to content

fix(GAT-8754): Fix empty widget preview state - #1577

Merged
philreekshdr merged 1 commit into
devfrom
fix/GAT-8754
Jul 15, 2026
Merged

fix(GAT-8754): Fix empty widget preview state#1577
philreekshdr merged 1 commit into
devfrom
fix/GAT-8754

Conversation

@philreekshdr

Copy link
Copy Markdown
Collaborator

Screenshots / videos (if relevant)

image

Describe your changes

The embeddable widget preview always defaulted its category dropdown to "Datasets & Biosamples", even for widgets that contained no datasets — showing a misleading label and an empty list. The selected category is now derived from the categories that actually have content: it keeps the user's selection when valid, otherwise falls back to the first populated category. When a widget has no content in any category, the category nav is hidden entirely and the content area shows a "No data was selected for this widget" message instead. This keeps the preview honest about what a widget will actually display.

Issue ticket link

https://hdruk.atlassian.net/browse/GAT-8754

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have added appropriate unit tests / e2e tests (where relevant)
  • I have created mocks for api endpoints (where appropriate)
  • The interface is responsive (where ticket is relevant)
  • The interface is at least AA (where ticket is relevant)
  • Commits are described as "(chore|fix|feature|test|maintenance): description"

@gh-actions-pipelines-app

Copy link
Copy Markdown

🎉 Great job! Your PR title follows the correct format. 🚀

@github-actions

Copy link
Copy Markdown

⚠️ This PR touches the third-party widget embed surface

Widgets generated by the widget creator are embedded in external
websites we do not control
. A breaking change here fails silently
on those sites.

  • The widget contract tests (*.contract.test.*, widget-embed.cy.ts)
    must pass.
  • If a contract change is intentional, flag the change in release
    notes, and notify teams with active widgets before release.

@philreekshdr
philreekshdr merged commit a827c08 into dev Jul 15, 2026
4 checks passed
@philreekshdr
philreekshdr deleted the fix/GAT-8754 branch July 15, 2026 15:51
gh-actions-pipelines-app Bot pushed a commit that referenced this pull request Jul 24, 2026
## [2.40.0](v2.39.0...v2.40.0) (2026-07-24)

### ✨ Features

* **GAT-7563:** Data Custodian Network = Split owned/associated content (#1569) ([7e462ff](7e462ff)), closes [GAT-7563](undefinedGAT-7563)
* **GAT-7564:** Data custodian associated resources (#1567) ([45e9c1d](45e9c1d)), closes [GAT-7564](undefinedGAT-7564)
* **GAT-7604:** Data custodian display tweaks (#1562) ([82b222c](82b222c)), closes [GAT-7604](undefinedGAT-7604)
* **GAT-8094:** Display dataset aliases (#1566) ([65e819a](65e819a)), closes [GAT-8094](undefinedGAT-8094)
* **GAT-8131:** Widget test harness (#1573) ([ac6fda3](ac6fda3)), closes [GAT-8131](undefinedGAT-8131)
* **GAT-8478:** Add support link (#1571) ([c51fa80](c51fa80)), closes [GAT-8478](undefinedGAT-8478)
* **GAT-8709:** Fix confusing naming for running a fedaration test. ([6aedd84](6aedd84))
* **GAT-8724:** Update dataset filter order (#1576) ([71843f9](71843f9)), closes [GAT-8724](undefinedGAT-8724)
* **GAT-8798:** Added run now button for integrations ([f944277](f944277)), closes [GAT-8798](undefinedGAT-8798)
* **GAT-8821:** Correct DAR dialog & save draft logic (#1578) ([04eace6](04eace6)), closes [GAT-8821](undefinedGAT-8821)
* **GAT-9193:** Update sign-in modal design (#1581) ([ee76b95](ee76b95)), closes [GAT-9193](undefinedGAT-9193)
* **GAT-9193:** Update wording (#1582) ([68ae7bb](68ae7bb)), closes [GAT-9193](undefinedGAT-9193)

### 🐛 Bug Fixes

* **GAT-8754:** Fix empty widget preview state (#1577) ([a827c08](a827c08))
* **GAT-9237:** bug in the onboarding form for tools (#1579) ([2071ecb](2071ecb)), closes [GAT-9237](undefinedGAT-9237)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants