Skip to content

Conversation

@sejas
Copy link
Member

@sejas sejas commented Jan 8, 2025

Related issues

Proposed Changes

  • Replace link in demo sites to open the browser instead of copy the link.
  • Add tests to check the link opens the browser with the correct link

It follows the same style as Sync links but without tooltip.

<Tooltip text={ connectedSite.url } className="overflow-hidden">
<Button
variant="link"
className="!text-a8c-gray-70 hover:!text-a8c-blueberry max-w-[100%]"
onClick={ () => {
getIpcApi().openURL( connectedSite.url );
} }
>
<span className="truncate">{ connectedSite.url }</span> <ArrowIcon />
</Button>
</Tooltip>

Testing Instructions

  • Run `npm start``
  • Click on Share tab
  • Create a new demo site
  • Observe the demo site link opens the browser instead of copying it
  • Tests should pass
Before After
Screenshot 2025-01-08 at 20 42 16 Screenshot 2025-01-08 at 20 42 08

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@sejas sejas self-assigned this Jan 8, 2025
@sejas sejas requested a review from a team January 8, 2025 20:50
Copy link
Contributor

@fredrikekelund fredrikekelund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Why did we add the tooltip in the Sync tab again..? There's less horizontal space in the Sync tab compared to the Share tab. Is that it?

@sejas
Copy link
Member Author

sejas commented Jan 9, 2025

LGTM 👍 Why did we add the tooltip in the Sync tab again..? There's less horizontal space in the Sync tab compared to the Share tab. Is that it?

Yes! That’s the reason. We have less space in the Sync tab, and the domains are determined by the user, which means they can be very long and might be truncated. In contrast, the subdomains generated in the Share tab are a combination of 2-3 words.

@sejas sejas merged commit a8447ba into trunk Jan 9, 2025
6 checks passed
@sejas sejas deleted the update/demo-sites-open-link-in-browser branch January 9, 2025 13:03
@wojtekn
Copy link
Contributor

wojtekn commented Jan 9, 2025

Thanks for the fix, it improves the UX around demo sites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants