feat: link Profile Analysis from the Resources nav - #4048
Merged
Conversation
Add a "Profile Analysis" entry to the Resources dropdown so the page at /profile-analysis is reachable from the site navigation. The nav item list drives both the desktop dropdown and the mobile panel, so no separate mobile change is needed. Also state the supported Profile version above the file drop zone. Profiles produced before Apache Doris 4.1 may fail to parse, so the notice sits in the uploader section where it is read before a file is picked and stays visible on both the visualization and AI tabs. It reuses the existing warning callout style rather than adding a second one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Bring the Profile Analysis page online.
/profile-analysisshipped in #4043 but nothing on the site links to it, so the page is only reachable by typing the URL. This adds the missing navigation entry, plus a version notice the page needs before users start feeding it Profiles.Changes
1. Resources nav entry —
src/components/home-next/NavbarNext.tsxAdds
Profile Analysisto the Resources dropdown.buildNavItemsdrives both the desktop dropdown and the mobile panel, so the single entry covers both. Thehrefomits the locale prefix, matching the neighbouring/blog,/events, and/courseentries — DocusaurusLinkresolves it against the localized baseUrl.2. Supported-version notice —
src/components/profile-analysis/ProfileUploader.tsxPlaced in the "Choose a Query Profile" section directly above the drop zone, so it is read before a file is picked and stays visible on both the Visualize Execution and AI-assisted analysis tabs.
The callout reuses the existing
__ai-warningrule inProfileAnalysis.scss— the selector is widened to&__ai-warning, &__version-noticerather than duplicating the block. No new colors; it keeps using the existing Infima warning tokens.Notes
The page text is hard-coded English throughout (the privacy notice, the tab labels, the uploader help text), so the notice is English too. Localizing it would mean routing the whole component through
<Translate>, which is out of scope here.Testing
Extended
profile-analysis.components.test.jswith a case covering the notice text, its DOM position relative to the drop zone, and the style rule. Full file passes:🤖 Generated with Claude Code