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

Merge breadcrumb bar to top, improve sidebar navigation #133

Merged
merged 5 commits into from
Jul 11, 2022

Conversation

Neha9849
Copy link
Member

@Neha9849 Neha9849 commented Jun 21, 2022

Changes made:

  1. Moved breadcrumb to the top
  2. Removed the repo name in the breadcrumb

Fixes #122

@Neha9849 Neha9849 requested a review from jwflory June 21, 2022 21:27
@jwflory jwflory self-assigned this Jun 22, 2022
@jwflory jwflory added the T: improvement Improves on something that already exists label Jun 22, 2022
@jwflory
Copy link
Member

jwflory commented Jun 22, 2022

Rebased on latest changes in main.

Copy link
Member

@jwflory jwflory left a comment

Choose a reason for hiding this comment

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

Overall, this looks great to me! The breadcrumb navigation is more visually distinct and I think this increases its usefulness. I haven't gone deep on this PR yet, so I am leaving three observations for you to review when you are online next.


No. 1: The breadcrumb text is inconsistent whether you are looking at a category index page or a specific page within a category. See below:

Screenshot of the breadcrumb bar while viewing the "Billing & Pricing" category index page. Note the title is rendered correctly.

Screenshot of the breadcrumb bar while viewing a page within the "Billing & Pricing" category. Note the title is not rendered correctly.

Could you dig into this and figure out why the category title is inconsistent?


No. 2: The breadcrumb appears on the site homepage, which is not helpful. It should be hidden/excluded if the current page is the site's homepage. See below:

The breadcrumb bar appears on the homepage, even though it should be intuitive that the user is viewing the homepage without the breadcrumb bar.

I think this one could be resolved easily by adding a boolean check to only render the breadcrumb bar if the current page does not equal the site homepage.


No. 3: Is there a more Hugo-centric way of creating the breadcrumb bar? We currently use custom JavaScript for the breadcrumb bar, which works… but I think some of the issues that are cropping up here are because we are trying to reinvent the wheel. What would a more Hugo-centric way of doing this look like? This does broaden the scope of this change, but it might be worthwhile to take this moment to improve the breadcrumb bar by using some Hugo helper functions and templating to help us create instead of custom JavaScript.

While I have not inspected the following links closely, there seem to be lots of hints on more elegant ways of doing this, like this blog post and this Hugo forum thread. These could be good jumping-off points to figure out what makes the most sense for us.


We can chat about this Pull Request in our check-in chat tomorrow! 🙂 You're on the right track here so far, but we can polish this further for a better solution.

@Neha9849
Copy link
Member Author

@jwflory I couldn't figure out why the path was inconsistent.
In single page's the actual behaviour is expected but coming to list page, i don't know why it's showing up like that.
And also, this problem is there even before.

@Neha9849
Copy link
Member Author

Yes, there is a hugo eccentric way of doing it.
I will do this in another PR as of now this PR contains a lot of changes and i think it's kinda hard to maintain.

@Neha9849
Copy link
Member Author

I have removed the breadcrumb in Home page

@Neha9849
Copy link
Member Author

@jwflory I am done with the basic layout.
But there are some changes to be done to the css in the mobile view.
Can you please look in to the desktop view and give a review and also checkout mobile view toggle feature of sidebar.
Do you think it's good or should i make changes to it?

@jwflory
Copy link
Member

jwflory commented Jun 24, 2022

Taking a look at this now. I probably won't get it reviewed fully before stand-up, but we can discuss this PR and next steps for Sprint 3.

@jwflory jwflory changed the title Moved breadcrumb to the top Merge breadcrumb bar to top, improve sidebar navigation Jun 24, 2022
Copy link
Member

@jwflory jwflory left a comment

Choose a reason for hiding this comment

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

I tested this locally and the change looks good! 👍🏻 But I want to understand the CSS and template changes better and consider how we load a new dependency (Font Awesome) into the site. There is a lot going on in this PR and I want to review its impact on other components.

For now, I left an in-line note about styling and whitespace. I will complete a more thorough review by the end of the week and leave comments as I go.

assets/css/style.css Show resolved Hide resolved
assets/css/style.css Show resolved Hide resolved
@jwflory
Copy link
Member

jwflory commented Jun 30, 2022

@Neha9849 There is a merge conflict with this PR since we merged #138 before it. I notice this could be a good opportunity to walk through rebasing since the commit size of the Pull Request grew.

We can set up time on Thursday to go through a rebase and also walk through this Pull Request together. I think a call would be faster to go through the questions I have too.

In the meantime, I suggest making a new branch copied from breadcrumbBar and trying rebasing on the latest changes fetched from main. You can make an attempt to solve the merge conflict from your copied branch, and then point your local branch at the remote branch once it is solved. Hopefully we can catch the problem as to why Pull Requests were closed like last time.

jwflory pushed a commit that referenced this pull request Jun 30, 2022
This commit refactors the existing breadcrumb bar to use a Hugo-native way of constructing the path. It also removes the duplicate "Home" and site title options, so the view is cleaner. Related to PR #133.
@jwflory
Copy link
Member

jwflory commented Jun 30, 2022

As expected, #138 created another merge conflict here. But since we worked through the major conflicts earlier, this rebase should be straightforward. @Neha9849, drop me a message once you get it rebased or if you hit any blocks! 🙂

I'll finish this review in a couple hours after I take my lunch.

minor fix

Modified navbar to make toggle icon inline with site title
@Neha9849
Copy link
Member Author

@jwflory I did the rebase, it was successful this time🥳
I understand many things in today's session thank you!
I may not understand everything but i will learn it👍

@jwflory
Copy link
Member

jwflory commented Jul 1, 2022

@Neha9849 wrote…
@jwflory I did the rebase, it was successful this time 🥳 I understand many things in today's session thank you! I may not understand everything but i will learn it 👍

Awesome! 💯 😎 These are advanced git skills we practiced today. But you went through it and did great! Practicing these skills also helps you work together in any distributed, collaborative project, especially when the number of committers grows. Keep it up 👍🏻

Unfortunately, I did not have time today to finish my review. I planned myself too thin for this sprint! Our team's meeting-free Fridays will make it easier for me to give this more focused time.

@Idadelveloper, if you have time on Friday, I would appreciit ate if you could review too. It can help speed this PR up 🙂

@jwflory jwflory requested a review from Idadelveloper July 1, 2022 05:19
@Idadelveloper
Copy link
Contributor

@Neha9849 this is tiny but please fix the typo in line 755 in the CSS file. Should be !important

blockquote p {
    color: var(--text-color-dark) !imporant;
}

Copy link
Contributor

@Idadelveloper Idadelveloper left a comment

Choose a reason for hiding this comment

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

@Neha9849 can you make the breadcrumb text consistent? We should have something like Home>Communities>Fedora rather than Home>communities>fedora.
Also is this how the button looks like from your end?

unicef-sidebar

@Neha9849
Copy link
Member Author

Neha9849 commented Jul 1, 2022

@Neha9849 can you make the breadcrumb text consistent? We should have something like Home>Communities>Fedora rather than Home>communities>fedora.

@Idadelveloper
I have added CSS to do that but seems it's not working maybe some other class CSS is dominating, I will add !important to it and will check out if that works

Also, is this what the button looks like from your end?

yep, I haven't noticed it there is some issue with the width, I will fix it out

@Neha9849
Copy link
Member Author

Neha9849 commented Jul 1, 2022

@Idadelveloper I fixed them
Can you check whether it's good now

@Neha9849 Neha9849 requested a review from Idadelveloper July 1, 2022 18:58
@Neha9849
Copy link
Member Author

Neha9849 commented Jul 1, 2022

@jwflory
image
The layout for the cohorts and teams page is the same as before.
As cohorts and teams pages are having its own layout, this resulted in this problem.
What are your thoughts on this?

Copy link
Member

@jwflory jwflory left a comment

Choose a reason for hiding this comment

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

This looks good to me. This is ready to merge. Thanks for working through the rounds of feedback on this one @Neha9849! Merging. 🎬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: improvement Improves on something that already exists
Projects
Archived in project
3 participants