DevLeonardoCommunity / github-stats

Aggregating and displaying YOUR GitHub Stats in meaningful metrics (we learn web development in the meantime)
https://public-github-stats.vercel.app
MIT License
71 stars 37 forks source link

Close dropdown on item click #108

Closed theflucs closed 6 months ago

theflucs commented 9 months ago

Describe the feature

The click on a list item should close the dropdown

It should be implemented because

Better UX

Additional context

No response

Would you like to work on this issue?

Yes

theflucs commented 9 months ago

I found a quite quick and (hope) neat way to implement this feature.

Also, when I was looking for all the places it was needed, I noticed some duplicated code with the export as image dropdown. So I created a new ExportDropdownButton component for it; so far it is used twice and it perfectly suits to be a reusable component without much work needed.

Can I push this code as part of the PR refactor: stats page #107, even if the refactoring is broader than the stats page only? Or should I create a new branch and submit a new PR for it?

These changes refer to the issues Refactoring stats page #102 and Close dropdown on item click #108.

@Balastrong and @CBID2 let me know what you think, thank you.

CBID2 commented 9 months ago

I found a quite quick and (hope) neat way to implement this feature.

Also, when I was looking for all the places it was needed, I noticed some duplicated code with the export as image dropdown.

So I created a new ExportDropdownButton component for it; so far it is used twice and it perfectly suits to be a reusable component without much work needed.

Can I push this code as part of the PR refactor: stats page #107, even if the refactoring is broader than the stats page only? Or should I create a new branch and submit a new PR for it?

These changes refer to the issues Refactoring stats page #102 and Close dropdown on item click #108.

@Balastrong and @CBID2 let me know what you think, thank you.

Hi @theflucs. I'm not the maintainer so it's up to @Balastrong

Balastrong commented 9 months ago

It's better to keep PRs as small as possible so let's wait for #107 to be closed first.