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

Add sidebar component #509

Merged
merged 13 commits into from
Aug 10, 2024
Merged

Add sidebar component #509

merged 13 commits into from
Aug 10, 2024

Conversation

Ajotah98
Copy link
Contributor

I updated the component "Sidebar" started on March.

Comment on lines 173 to 177
{{#each (to_array menu_item)}}
{{#if (or (eq (typeof this) 'object') (and (eq (typeof this) 'string') (starts_with this
'{')))}}
{{#with (parse_json this)}}
{{#if (or (or this.title this.icon) this.image)}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a little afraid of duplicating this logic... Do you think we could use the same markup for the horizontal and the vertical sidebars, with only classes differing between the two ? Or would that be impossible ?

Copy link
Collaborator

@lovasoa lovasoa left a comment

Choose a reason for hiding this comment

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

Cool, thank you very much for the PR ! I want to get it through the finish line ! Can you have a look at my comment above, and revert the indentation changes ?

I'm not against changing code style, but we can discuss that separately.

Otherwise, PRs are hard to review
@Ajotah98
Copy link
Contributor Author

Cool, thank you very much for the PR ! I want to get it through the finish line ! Can you have a look at my comment above, and revert the indentation changes ?

Sorry! I was busy. I'll update it asap and review the comment. Thanks!

@Ajotah98
Copy link
Contributor Author

Ajotah98 commented Aug 7, 2024

Hi! I was seeing the changes you have done and I really think... That is all done for now? I don't know if you want to implement more things onto the sidebar

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 7, 2024

As I said, I'm a little bit hesitant of duplicating the logic of parsing and iterating over the menu items. Is there any chance you can factor it in order to have the same markup for the horizontal and vertical bars, with only classes differing?

Copy link
Collaborator

@lovasoa lovasoa left a comment

Choose a reason for hiding this comment

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

Great, thank you very much !

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 8, 2024

I think this is ready :) Can you please resolve the conflicts so I can merge ?

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 8, 2024

The conflicts probably come from the changes made here to fix the elision of long titles:

6cc4cce#diff-255998f398cb0bb6096065f84876aea7a2ca35ba2c6dda8162e4195e2654ee94

@Ajotah98
Copy link
Contributor Author

Ajotah98 commented Aug 8, 2024

Okey, I was seeking whats causing merge conflicts, and testing the actual menu-items from the commit you posted, and:

image

With this new approach, the sidebar menu items get aligned into the right as you can see in the image.

I'll check how can I make if it's on sidebar, apply another CSS styles to make the layout more flex

@Ajotah98
Copy link
Contributor Author

Ajotah98 commented Aug 9, 2024

I'm more convinced that the conflicts are now solved. The conflicts showed on the branch are a white-space that no longer exists on the component and the addition of the inline of menu-items.

What are your thoughts about this @lovasoa ?

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 9, 2024

You can merge the main branch of this repo into your branch, then, and the conflicts will disappear here

@Ajotah98
Copy link
Contributor Author

Ajotah98 commented Aug 9, 2024

Cool, it worked. Thanks!

@lovasoa lovasoa merged commit 8638795 into sqlpage:main Aug 10, 2024
10 checks passed
@lovasoa
Copy link
Collaborator

lovasoa commented Aug 10, 2024

Great, here we are! Thank you!

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 10, 2024

Argh, I think this broke the menu layout on narrow screens :/

before

image

after

image

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 10, 2024

Also there is now an underline on the page title on hover

image

@Ajotah98
Copy link
Contributor Author

I'm going to check the CSS. Sorry for the inconvenience

@Ajotah98
Copy link
Contributor Author

Also there is now an underline on the page title on hover

image

This behaviour occurs in v.0.26.0. Is not a modification on the sidebar addition :/

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 10, 2024

Thank you ! No problem. You can have a look at the mobile layout problem, and I'll take care of the underline, then !

@Ajotah98
Copy link
Contributor Author

I found the problem! I'll try to fix it ASAP

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 10, 2024

I'm updating the https://sql.ophir.dev/examples/layouts.sql page to demonstrate the new sidebar

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.

2 participants