You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some tools hosted under the same domain as the instance (e.g., https://earth.gov/mobile-climate-mapper/) are not part of veda routes. Currently, these links are mistakenly marked with an "External Link" badge when shown in the UI. This can be misleading for users as these tools are not truly external (see screenshot below).
After discussing with @hanbyul-here during pod week, we identified two potential solutions:
Introduce an isExternalLink prop in the .mdx configuration files for each story, or,
Add logic in the card component to dynamically check the domain of the link and decide whether it is external
Option 2 requires less configuration for developers/users of VEDA instances, but it's not easy to test locally especially if we want more fine-grained control over future integration tests.
Acceptance Criteria
Given when then
Given when then
Related Tickets
[If applicable, link any tickets that are related]
The text was updated successfully, but these errors were encountered:
dzole0311
changed the title
Add isExternalLink param to the story metadata
Check the domain as well when checking for external links
Oct 14, 2024
dzole0311
changed the title
Check the domain as well when checking for external links
Incorrect "External Link" badge displayed for same-domain tools
Oct 14, 2024
#1192)
**Related Ticket:** #1187
### Description of Changes
After discussing with @hanbyul-here during pod week, we identified two
potential solutions:
1. Introduce an isExternalLink prop in the .mdx configuration files for
each story, or,
2. Add logic in the card component to dynamically check the domain of
the link and decide whether it is external
Option 2 requires less configuration for developers/users of VEDA
instances, but it's not easy to test locally especially if we want more
fine-grained control over future integration tests. So the
implementation here goes for Option 1.
More context:
https://developmentseed.slack.com/archives/C063GD0NYP8/p1728407361439379
- Add a new `isLinkExternal` prop that can be passed to the story as a
configuration
- The existing check for `http/https (/^https?:\/\//)` remains in place
as a fallback if the new prop is not present
### Notes & Questions About Changes
### Validation / Testing
- Use the new `isLinkExternal` prop in some of the stories and validate
that it shows/hides the "External Link" badge in the UI
- Remove the `isLinkExternal` prop that you added and see if the UI
still behaves as expected (e.g if the link you added in the story .mdx
file has `https`, it will be marked as `External Link` in the UI cards)
- Click around the UI cards and verify that the links work as expected
Context
Some tools hosted under the same domain as the instance (e.g., https://earth.gov/mobile-climate-mapper/) are not part of veda routes. Currently, these links are mistakenly marked with an "External Link" badge when shown in the UI. This can be misleading for users as these tools are not truly external (see screenshot below).
After discussing with @hanbyul-here during pod week, we identified two potential solutions:
isExternalLink
prop in the .mdx configuration files for each story, or,Option 2 requires less configuration for developers/users of VEDA instances, but it's not easy to test locally especially if we want more fine-grained control over future integration tests.
Acceptance Criteria
Related Tickets
[If applicable, link any tickets that are related]
The text was updated successfully, but these errors were encountered: