luizotavio32 opened a new pull request, #42008:
URL: https://github.com/apache/superset/pull/42008

   ### SUMMARY
   
   Backport of two related embedded-dashboard fixes to the `6.1` branch.
   
   `hideTab` (#38846) was previously cherry-picked to `6.1` on its own, but was 
**reverted** (`3b7ddf88e9`) because it introduced a regression (#39419): making 
`hideTab: true` actually skip rendering the `Tabs` component meant the 
`useEffect` inside `Tabs` never fired, so Redux `activeTabs` stayed `[]`. 
`useIsFilterInScope` then treated **every** native filter as out-of-scope, 
producing a blank filter bar on embedded dashboards with tabs.
   
   `master`/`6.2` resolved this by shipping the `hideTab` fix **together with** 
its follow-up (#39417), which makes `useActiveDashboardTabs` fall back to a 
layout-derived default-tab path when `activeTabs` is empty. This PR brings 
**both** commits to `6.1` so the feature works without reintroducing the 
regression:
   
   - **#38846** — `DashboardBuilder.tsx`: gate the top-level tab bar on 
`!uiConfig.hideTab` in addition to `!uiConfig.hideNav`, so `hideTab: true` 
actually hides the tab bar.
   - **#39417** — `nativeFilters/state.ts`: when Redux `activeTabs` is empty, 
derive the default (first) tab at each nesting level from `dashboardLayout` for 
scope evaluation. Filter bar always renders; filters scoped to the default tab 
are visible; filters scoped only to other tabs stay hidden; permalink case is 
unchanged.
   
   Note: the #39417 test file (`state.test.ts`) diverged from `6.1`. During 
conflict resolution, two unrelated `useChartCustomizationConfiguration ignores 
null/undefined items` tests (which depend on behavior not present in `6.1`) 
were dropped, as they are not part of #39417.
   
   ### TESTING INSTRUCTIONS
   
   1. Set up an embedded dashboard with top-level tabs and native filters 
scoped per tab (e.g. one filter scoped to Tab A, another to Tab B).
   2. Load embedded fresh with `hideTab: true` in the SDK `dashboardUiConfig` — 
clear session storage.
   3. **Expected:** Tab bar is hidden; filter bar renders with the controls 
scoped to the default (first) tab; filters scoped only to non-default tabs stay 
hidden.
   4. Frontend unit tests: `npx jest 
src/dashboard/components/nativeFilters/state.test.ts` (25 passing).
   
   ### ADDITIONAL INFORMATION
   - [x] Changes UI
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   Cherry-picks: #38846, #39417 (targets `6.1`).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to