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

Use search icon instead of search input box in the navbar #575

Merged
merged 6 commits into from Sep 27, 2020
Merged

Conversation

garbas
Copy link
Member

@garbas garbas commented Sep 24, 2020

fixes #545


This change is Reviewable

@garbas
Copy link
Member Author

garbas commented Sep 24, 2020

@samueldr I'm not so sure I did a good job with the flex box, but I got it working on the end. I think you should look at this to make sure I'm not complicating things unnecessary.

@github-actions
Copy link
Contributor

@samueldr
Copy link
Member

Totally not reviewing the important bits first.

When working with the DOM, we are using RSCSS to help keep class names coherent.

With this one notable addendum:

With one addendum that for qualified layout elements like body > header the component will not be named (e.g. page-header); the qualified name for the innate structure of the document is enough.

It's a bit hard sometimes to distinguish what is a component in our setup.

I would argue that, here, the component is the header nav (because of that addendum). So we're now dealing with elements.

Thus the element would be search or searchitem or searchlink.

In the next, and upcoming comment: actually reviewing the meat of the change.

It's simply impossible to use `:extend` with media queries. This is
because the rules are defined for a different media query!

As LESS *only* appends selectors to the other one, it doesn't since the
media queries don't match.

Sure, this means a little bit of repetition in the styles, but eh, what
can we do?
@github-actions
Copy link
Contributor

@samueldr
Copy link
Member

Some misc. tidbits:

We should remove unused styles, to prevent rot. If unused, but the intent is to re-use it soon, adding a comment stating so would be helpful. (Please call me out on it if I do it!)

No actionable elements should have an empty body! Right now this link is just empty if there is a lack of styles, or a lack of sight!


It seems there was an issue with image replacement stemming form the way LESS applies :extend. I fixed it.

This allows us to define the image replacement strictly for the proper media queries.

But why is the #svg definition applied outside the media query? For the same reason! Though here we definitely don't want to make #svg mixins that copy the whole SVG for each elements. This is not an issue because the :after pseudo-element won't show up in narrow viewports.


Finally, it'd be better to include this as part of the main navigation. It's weird to have an option that's not available for narrow viewports.

Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

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

but it works

layout.tt Outdated Show resolved Hide resolved
@garbas
Copy link
Member Author

garbas commented Sep 27, 2020

@samueldr thank you for all the explanation. Agree with your decisions on every point.

@github-actions
Copy link
Contributor

@garbas garbas merged commit 475485f into master Sep 27, 2020
@garbas garbas deleted the fix-545 branch September 27, 2020 08:25
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.

No search at the top on smaller widths
3 participants