Fix internal links in the options page

Repository details (talkie)
Project page
talkie
Project log category
(708 entries)
Repository
@joelpurra/talkie
Owner
@joelpurra
Contributors
Contributors on Github
Project status
⏲️ This project has had recent commits.
📂 This project is open.
🌠 This project is popular.
Repository activity period
🗓
Commits
751 commits
Stars
71 stars
Commit details (974fb460)
Author
Authored at
Committer
Joel Purra
Committed at

Commit message

Fix internal links in the options page

  • Linking internal options tabs with an (extension root-)absolute URL triggered a full page reload.
    • This means losing page state.
    • For (the apt, non-snap installation) Firefox on Ubuntu with 8000+ voices, a page reload incurs a significant delay.
  • Instead, using hash-only links, rely on the hashchange event to switch tabs.
    • This keeps page state, while allowing browser back/forth buttons to work.
    • Particularly useful for keeping the selected voice in the #voices tab, since navigating to a specific voice again is not effortless.
  • Absolute URLs are still used for links from outside the options page, such as the popup and welcome page.
  • Cleaned up the configuration object.
    • Removed dynamic URL assembly, moved hardcoded values to configuration.json.
    • Grouped internal/external hardcoded URLs.
Raw text
Fix internal links in the options page

- Linking internal options tabs with an (extension root-)absolute URL triggered a full page reload.
  - This means losing page state.
  - For (the `apt`, non-`snap` installation) Firefox on Ubuntu with 8000+ voices, a page reload incurs a significant delay.
- Instead, using hash-only links, rely on the `hashchange` event to switch tabs.
  - This keeps page state, while allowing browser back/forth buttons to work.
  - Particularly useful for keeping the selected voice in the `#voices` tab, since navigating to a specific voice again is not effortless.
- Absolute URLs are still used for links from outside the options page, such as the popup and welcome page.
- Cleaned up the configuration object.
  - Removed dynamic URL assembly, moved hardcoded values to `configuration.json`.
  - Grouped internal/external hardcoded URLs.

Changed files (16)

Path Additions Deletions
code/packages/browser-background/src/background/get-command-map.mts +2 -2
code/packages/options-application/src/app/footer.tsx +2 -10
code/packages/options-application/src/app/header.tsx +2 -2
code/packages/options-application/src/app/sections/about.tsx +3 -3
code/packages/options-application/src/app/sections/features.tsx +2 -2
code/packages/options-application/src/app/sections/features/talkie-premium-edition.tsx +2 -2
code/packages/options-application/src/app/sections/support.tsx +3 -3
code/packages/options-application/src/app/sections/usage.tsx +2 -2
code/packages/options-application/src/components/section/edition-section.tsx +4 -10
code/packages/popup-application/src/app/sections/footer.tsx +2 -2
code/packages/popup-application/src/app/sections/header.tsx +2 -2
code/packages/popup-application/src/app/sections/menu.tsx +4 -4
code/packages/shared-application/src/configuration/configuration.mts +2 -35
code/packages/shared-application/src/data/configuration/configuration.json +31 -14
code/packages/shared-application/src/data/configuration/configuration.mts +8 -29
code/packages/split-environment-webextension/src/browser-specific/urls.mts +3 -3

Commit categories (3)