Abejithp opened a new pull request, #36349: URL: https://github.com/apache/superset/pull/36349
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY This PR introduces an integrated glossary system that establishes a single source of truth for term definitions used across both Superset's documentation site and the application itself. Previously, terminology explanations were fragmented across scattered tooltip descriptions, documentation pages, and various help text throughout the codebase, leading to inconsistencies and maintenance challenges when definitions needed updates. **Key Features:** - Centralizes all term definitions in a single source that powers both in-app tooltips and the documentation site - "Write once, use everywhere" approach ensures automatic consistency when definitions are added or updated - Eliminates outdated or contradictory explanations across the platform **Implementation:** - Wraps the existing Tooltip component to detect glossary-encoded strings and transform them into interactive elements - Uses simple encoding pattern (e.g., `glossary.Query.Row_Limit.encode()`) with type safety and IDE autocompletion - Documentation page dynamically renders from the same source definitions as tooltips - Interactive tooltips include "Click to Learn More" links that navigate to the glossary docs **Current Scope & Future Plans:** - Initial implementation focuses on the Explore interface with a small subset of chart controls (Dimensions, Metrics, Series, Row Limit, Sort, Time Shift) - Architecture designed to scale application-wide - Future expansion planned for dashboards, SQL Lab, dataset configuration, and other interfaces throughout Superset --- ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF ### Before: <img width="386" height="230" alt="before_tooltip" src="https://github.com/user-attachments/assets/c474a037-b504-4ffc-8690-ebf7cd332d61" /> ### After: https://github.com/user-attachments/assets/2b69fd20-5ccb-45ae-8417-8b11d5dce58e <img width="385" height="264" alt="after_tooltip" src="https://github.com/user-attachments/assets/d669537b-6429-4a01-940f-46d9f3aae725" /> <img width="1904" height="918" alt="SuperSet_Glossary" src="https://github.com/user-attachments/assets/1149bffd-b27d-4ce5-918e-112ae1e00a41" /> ### TESTING INSTRUCTIONS **Prerequisites** - Superset backend running on `http://localhost:8088` - Python virtual environment activated **Steps** 1. **Start the frontend development server**: ``` cd superset-frontend npm install npm run dev ``` 2. **Start the documentation server**: ``` cd docs yarn install yarn docusaurus start ``` **Note:** Set the docs version dropdown to **"next"** in the top navigation bar to see the glossary page. The glossary feature is only available in the next version documentation. 3. **Navigate to a chart in Explore view** - Open `http://localhost:9000` in your browser - Navigate to **Charts** → Select any existing chart (e.g., "Games per Genre over time") 4. **Test glossary-integrated tooltips** Currently, only a **small subset of controls** have been integrated with the glossary. Test the following: **Query Section:** - Hover over the **info icon (ℹ️)** next to these control labels: - **"Dimensions"** - Shows description about qualitative categorization data - **"Metrics"** - Shows description about aggregation functions - **"Series"** or **"Series Limit"** - Shows description about limiting series displayed - **"Row Limit"** - Shows description about limiting rows displayed - **"Sort"** - Shows description about query result ordering **Advanced Analytics Section (if visible):** - **"Time Shift"** - Shows description about overlaying relative time periods 5. **Verify glossary tooltip interaction** For any glossary-integrated tooltip: a. **Hover behavior:** - Hover over the info icon to display the tooltip - Verify the tooltip shows the term description - Verify the tooltip includes "Click to Learn More" text at the bottom - **Verify the info icon is highlighted in blue** when hovering b. **Click behavior:** - Click on the info icon with the tooltip displayed - Verify it opens `http://localhost:3000/docs/glossary` in a new tab - Verify the URL includes a hash fragment (e.g., `#Query__Row_Limit`) - Verify the corresponding term row is highlighted on the glossary page - Verify the page scrolls to center the term in view Additional controls will be integrated in future iterations. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [x] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
