Skip to content

Update demo sites to open link in browser instead of copying the link - #790

Merged
sejas merged 2 commits into
trunkfrom
update/demo-sites-open-link-in-browser
Jan 9, 2025
Merged

Update demo sites to open link in browser instead of copying the link#790
sejas merged 2 commits into
trunkfrom
update/demo-sites-open-link-in-browser

Conversation

@sejas

@sejas sejas commented Jan 8, 2025

Copy link
Copy Markdown
Member

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

@fredrikekelund fredrikekelund left a comment

Copy link
Copy Markdown
Contributor

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

sejas commented Jan 9, 2025

Copy link
Copy Markdown
Member Author

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
@sejas
sejas deleted the update/demo-sites-open-link-in-browser branch January 9, 2025 13:03
@wojtekn

wojtekn commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

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

3 participants