Repository navigation
feat(downloads): rework tab bar downloads indicator #3443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c15f2ef
feat(downloads): rework tab bar downloads indicator
jeanfbrito 403f5e1
fix(downloads): stop indicator shifting left when popup opens
jeanfbrito 9613298
feat(downloads): Chrome-style progress ring around the download icon
jeanfbrito 67d4d7d
fix(downloads): make the progress ring track subtle
jeanfbrito dd9456f
feat(downloads): dev-mode download simulation and orphaned-download c…
jeanfbrito 1b3eeef
fix(downloads): render percentage left of the icon button
jeanfbrito 1798d50
feat(downloads): experimental Chrome-style glyph variant for comparison
jeanfbrito 4cfc5a5
fix(downloads): chrome glyph theme color and clipped progress ring
jeanfbrito 50b4ebf
feat(downloads): chrome glyph uses full-size arrow, drops tray while …
jeanfbrito d58decd
fix(downloads): chrome glyph matches Fuselage icon color, no bounce
jeanfbrito fc8f3ba
fix(downloads): chrome variant shares the ProgressRing overlay
jeanfbrito 97228d3
feat(downloads): third variant tracing the Fuselage icon's own circle
jeanfbrito 0509fe9
feat(downloads): fourth variant fully redrawing the glyph
jeanfbrito 5c715da
feat(menu): expose simulate items in the tab bar options popup
jeanfbrito a19a369
feat(menu): check-for-updates and simulate items in the server switch…
jeanfbrito 2f36565
fix(downloads): compact indicator sizing in the thin titlebar
jeanfbrito 16bfa73
feat(downloads): redraw variant becomes the rendered indicator, title…
jeanfbrito da64a45
fix(downloads): unseen dot uses the presence-bullet green
jeanfbrito 4d56aac
refactor(downloads): single glyph design, percentage inside the button
jeanfbrito 1ea92e9
fix(downloads): unseen dot shares the progress arc's blue
jeanfbrito 62b4311
fix(downloads): keep the glyph bright after completion until acknowle…
jeanfbrito 8367003
feat(downloads): percentage text defaults to off
jeanfbrito 4ec28ea
fix(downloads): full blue circle until acknowledged, dot tangent on t…
jeanfbrito afbf0e6
fix(downloads): unify titlebar gap with the tab bar, reserve 3ch for …
jeanfbrito 50324cc
feat(downloads): percentage on the right, animated, square icon-only …
jeanfbrito 44d02f6
fix(downloads): trailing padding after the percentage in compact mode
jeanfbrito c3ded1d
Merge remote-tracking branch 'origin/master' into feat/downloads-indi…
jeanfbrito 0faa13b
fix(downloads): correct reduced-motion media query and pin platform i…
jeanfbrito 8ea8655
test: make motion assertions environment-independent
jeanfbrito File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
46 changes: 46 additions & 0 deletions
46
src/ui/components/SettingsView/features/DownloadsPercentage.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import type { ChangeEvent } from 'react'; | ||
| import { useCallback, useId } from 'react'; | ||
| import { useTranslation } from 'react-i18next'; | ||
| import { useDispatch, useSelector } from 'react-redux'; | ||
| import type { Dispatch } from 'redux'; | ||
|
|
||
| import type { RootAction } from '../../../../store/actions'; | ||
| import type { RootState } from '../../../../store/rootReducer'; | ||
| import { SETTINGS_SET_DOWNLOADS_PERCENTAGE_ENABLED_CHANGED } from '../../../actions'; | ||
| import { ToggleField } from './ToggleField'; | ||
|
|
||
| type DownloadsPercentageProps = { | ||
| className?: string; | ||
| }; | ||
|
|
||
| export const DownloadsPercentage = (props: DownloadsPercentageProps) => { | ||
| const isDownloadsPercentageEnabled = useSelector( | ||
| ({ isDownloadsPercentageEnabled }: RootState) => | ||
| isDownloadsPercentageEnabled | ||
| ); | ||
| const dispatch = useDispatch<Dispatch<RootAction>>(); | ||
| const { t } = useTranslation(); | ||
| const handleChange = useCallback( | ||
| (event: ChangeEvent<HTMLInputElement>) => { | ||
| const isChecked = event.currentTarget.checked; | ||
| dispatch({ | ||
| type: SETTINGS_SET_DOWNLOADS_PERCENTAGE_ENABLED_CHANGED, | ||
| payload: isChecked, | ||
| }); | ||
| }, | ||
| [dispatch] | ||
| ); | ||
|
|
||
| const isDownloadsPercentageEnabledId = useId(); | ||
|
|
||
| return ( | ||
| <ToggleField | ||
| id={isDownloadsPercentageEnabledId} | ||
| label={t('settings.options.downloadsPercentage.title')} | ||
| description={t('settings.options.downloadsPercentage.description')} | ||
| checked={isDownloadsPercentageEnabled} | ||
| onChange={handleChange} | ||
| className={props.className} | ||
| /> | ||
| ); | ||
| }; |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the German spelling error.
Replace
FortschrittsprozenzsatzwithFortschrittsprozentsatz.Proposed correction
📝 Committable suggestion
🤖 Prompt for AI Agents