dubinc / dub

Open-source link management infrastructure
https://dub.co
GNU Affero General Public License v3.0
16.78k stars 1.71k forks source link

Make link card clickable into analytics page #511

Open anuragts opened 6 months ago

anuragts commented 6 months ago

So, I personally faced this issue. When I want to check the analytics of any link, I have to click the small icon on the left. However, by default, the whole component is unclickable. As a user, I want to access the analytics when I click the component.

image

And also, it's hard to click the analytics button on smaller mobile screens because the copy icons coincide with the analytics button.

image

linear[bot] commented 6 months ago

ENG-110 Making the whole link component clickable.

anuragts commented 6 months ago

I would love to work on this. Can you assign me the issue ?

unrenamed commented 5 months ago

@anuragts @steven-tey Let me know if I'm wrong but I think the idea of having the link card selectable is to leverage keyboard shortcuts registered for each card. For instance, selecting a card and pressing x would open the delete modal, enhancing the speed of link management once the user is familiar with the shortcut keys.

You can see the full list of shortcuts registered in the card menu:

image

Making the entire card clickable is going to break the feature described.

As for the mobile view issue, I can agree with @anuragts that it's hard to click the analytics button because of the overlapping copy button. I'd hazard a guess this is what the OP wants to be fixed in the first place, am I right @anuragts?

We can, as an option, hide the copy icon beyond a certain screen width using a media query and relocating it to the card menu. Wdyt?

pavanpa1g commented 5 months ago

Hi there! I'm interested in working on this issue. Could you please assign it to me? I'm excited about contributing to the project and believe I can help resolve this effectively. Looking forward to your response!

steven-tey commented 5 months ago

Thanks for the feedback here! We probably don't want the whole card to link to the analytics page since, as @unrenamed mentioned above, it's tied to the shortcut keys + we want to enable multi-select & bulk actions in the future.

@unrenamed's idea to hide the copy icon beyond a certain screen width using a media query and relocating it to the card menu sounds a bit more feasible – we could potentially do this with xs screens?

unrenamed commented 5 months ago

@steven-tey Sure thing, we can use breakpoint prefixes to hide the copy icon and show the "Copy" action in the card menu beyond a certain screen width, say... 640px (sm)