Use URL objects for external URLs
Repository details (talkie)
- Project page
- talkie
- Project category
- talkie (588 entries)
- Repository
-
@joelpurra/talkie
- Owner
-
@joelpurra
- Issues
-
@joelpurra/talkie/issues
- Contributors
-
@joelpurra/talkie/graphs/contributors
Commit details (93a05073)
- Author
- Joel Purra
- Authored at
- Commiter
- Joel Purra
- Commited at
Commit message
Use URL objects for external URLs - Prefer URL objects over strings to clearly distinguish the intent on a type level. - Currently only used for external URLs. - Cannot be (plainly) used for internal URLs, as they are always defined as relative. - URL objects require a base URL string when used with relative URL strings. - The base URL of web extensions contains the extension id, which is known for published extensions. - During webext debugging, a temporary id is generated, so the the base URL would need to be resolved at runtime. - Could use `IInternalUrlProvider` for each interal URL object creation/validation, but at this time chose not to.
Changed files (10)
-
code/packages/options-application/src/app/main.tsx
+4, -3 -
code/packages/options-application/src/components/navigation/nav-container-types.mts
+6, -2 -
code/packages/options-application/src/components/navigation/nav.tsx
+34, -39 -
code/packages/popup-application/src/app/main.tsx
+1, -1 -
code/packages/shared-ui/src/slices/navigation.mts
+4, -1 -
code/packages/shared-ui/src/utils/ui.mts
+4, -2 -
code/packages/split-environment-interfaces/src/iapi.mts
+1, -1 -
code/packages/split-environment-node/src/server-specific/api.mts
+1, -1 -
code/packages/split-environment-webextension/src/browser-specific/api.mts
+1, -1 -
code/packages/split-environment-webextension/src/browser-specific/urls.mts
+12, -5