Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Sidebar component #383

Closed
wants to merge 4 commits into from
Closed

feat: Sidebar component #383

wants to merge 4 commits into from

Conversation

marc2332
Copy link
Owner

To Do

  • integrate theming
  • UX and UI improvements

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (40ebce5) 53.23% compared to head (0f09a23) 53.16%.

Files Patch % Lines
crates/components/src/sidebar.rs 0.00% 15 Missing ⚠️
crates/hooks/src/use_theme.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #383      +/-   ##
==========================================
- Coverage   53.23%   53.16%   -0.08%     
==========================================
  Files         143      144       +1     
  Lines       12665    12682      +17     
==========================================
  Hits         6742     6742              
- Misses       5923     5940      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marc2332 marc2332 changed the title feat: Sidebar as a component in freya-components feat: Sidebar component Dec 20, 2023
@tigerros
Copy link

I'll take a look at this if that's alright

@marc2332
Copy link
Owner Author

I'll take a look at this if that's alright

Sure! Np, but it is still WIP

@tigerros
Copy link

I'll take a look at this if that's alright

Sure! Np, but it is still WIP

I'll at least update it for the new theming system

@tigerros
Copy link

I just realized that SidebarItem is basically a Link. I'll finish #411 and then I'll update the router + sidebar example.

@marc2332
Copy link
Owner Author

marc2332 commented Jan 1, 2024

I just realized that SidebarItem is basically a Link. I'll finish #411 and then I'll update the router + sidebar example.

It isn't just a Link as it has an optional onclick handler + style built-in

@tigerros
Copy link

tigerros commented Jan 1, 2024

I just realized that SidebarItem is basically a Link. I'll finish #411 and then I'll update the router + sidebar example.

It isn't just a Link as it has an optional onclick handler + style built-in

Right, but I would prefer to remove the Link functionality from it, since it's not always going to be used that way. I think using a dedicated Link component when needed makes more sense. Do you think you could merge #411?

@marc2332
Copy link
Owner Author

marc2332 commented Jan 1, 2024

I just realized that SidebarItem is basically a Link. I'll finish #411 and then I'll update the router + sidebar example.

It isn't just a Link as it has an optional onclick handler + style built-in

Right, but I would prefer to remove the Link functionality from it, since it's not always going to be used that way. I think using a dedicated Link component when needed makes more sense. Do you think you could merge #411?

I'll think about it. I don't like having a Link component because you can't use it in combination with Button for example because there is no event bubbling. That's why I removed it and why #411 is marked as blocked

@tigerros
Copy link

tigerros commented Jan 1, 2024

I just realized that SidebarItem is basically a Link. I'll finish #411 and then I'll update the router + sidebar example.

It isn't just a Link as it has an optional onclick handler + style built-in

Right, but I would prefer to remove the Link functionality from it, since it's not always going to be used that way. I think using a dedicated Link component when needed makes more sense. Do you think you could merge #411?

I'll think about it. I don't like having a Link component because you can't use it in combination with Button for example because there is no event bubbling. That's why I removed it and why #411 is marked as blocked

ExternalLink exists though and I think it has the same issue as Link, doesn't it? Or what do you mean exactly?

@marc2332
Copy link
Owner Author

marc2332 commented Jan 1, 2024

I just realized that SidebarItem is basically a Link. I'll finish #411 and then I'll update the router + sidebar example.

It isn't just a Link as it has an optional onclick handler + style built-in

Right, but I would prefer to remove the Link functionality from it, since it's not always going to be used that way. I think using a dedicated Link component when needed makes more sense. Do you think you could merge #411?

I'll think about it. I don't like having a Link component because you can't use it in combination with Button for example because there is no event bubbling. That's why I removed it and why #411 is marked as blocked

ExternalLink exists though and I think it has the same issue as Link, doesn't it? Or what do you mean exactly?

Yes, same for ExternalLink

@tigerros
Copy link

tigerros commented Jan 1, 2024

I just realized that SidebarItem is basically a Link. I'll finish #411 and then I'll update the router + sidebar example.

It isn't just a Link as it has an optional onclick handler + style built-in

Right, but I would prefer to remove the Link functionality from it, since it's not always going to be used that way. I think using a dedicated Link component when needed makes more sense. Do you think you could merge #411?

I'll think about it. I don't like having a Link component because you can't use it in combination with Button for example because there is no event bubbling. That's why I removed it and why #411 is marked as blocked

ExternalLink exists though and I think it has the same issue as Link, doesn't it? Or what do you mean exactly?

Yes, same for ExternalLink

Why can't Link be merged then?

@marc2332
Copy link
Owner Author

marc2332 commented Jan 2, 2024

I just realized that SidebarItem is basically a Link. I'll finish #411 and then I'll update the router + sidebar example.

It isn't just a Link as it has an optional onclick handler + style built-in

Right, but I would prefer to remove the Link functionality from it, since it's not always going to be used that way. I think using a dedicated Link component when needed makes more sense. Do you think you could merge #411?

I'll think about it. I don't like having a Link component because you can't use it in combination with Button for example because there is no event bubbling. That's why I removed it and why #411 is marked as blocked

ExternalLink exists though and I think it has the same issue as Link, doesn't it? Or what do you mean exactly?

Yes, same for ExternalLink

Why can't Link be merged then?

Because similarly to externalLink, having these two without event bubbling is having a half-working solution

@tigerros
Copy link

tigerros commented Jan 2, 2024

Because similarly to externalLink, having these two without event bubbling is having a half-working solution

I know, but ExternalLink exists, so why not Link? They should either both exist, or neither of them should exist, because they have the same problem. Not including thing A for problem X makes no sense when there's thing B that also has problem X.

@marc2332
Copy link
Owner Author

marc2332 commented Jan 2, 2024

Because similarly to externalLink, having these two without event bubbling is having a half-working solution

I know, but ExternalLink exists, so why not Link? They should either both exist, or neither of them should exist, because they have the same problem. Not including thing A for problem X makes no sense when there's thing B that also has problem X.

Ooops, I didn't realize ExternalLink was already on main, my bad. I guess it doesn't hurt more to have Link as well then

@tigerros tigerros mentioned this pull request Feb 18, 2024
@marc2332
Copy link
Owner Author

Closing in favor of #513

@marc2332 marc2332 closed this Feb 18, 2024
@marc2332 marc2332 deleted the feat/sidebar-component branch March 28, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants