-
Notifications
You must be signed in to change notification settings - Fork 39
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
Update website styling and add Google site verification #408
Conversation
// Overrides for Just the Docs, see | ||
// https://github.com/just-the-docs/just-the-docs/blob/main/_sass/support/_variables.scss. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I slightly rephrased this compared to the website
branch.
Looks good. No mutations were possible for these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W.r.t. the favicon
, I see we added a new one, should we also delete the other?
Left some comments and suggestions :).
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-eps-light.css' | relative_url }}" | ||
media="(prefers-color-scheme: light)"> | ||
media="(prefers-color-scheme: light)"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These spaces seem a bit weird 👀. Is that because of a formatter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to have changed during cherry-pick from @oxkitsune's branch to mine. This formatting happens to me as part of IntelliJ formatting (CTRL-ALT-L). Currently no CI formatting/linting is in place for these files, nor could I find any so quickly to run it as a one-off. I'm happy with reverting if you'd like. If we go with IntelliJ formatting for now, I'll remove the space at the last line before />
too (committed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah let's do IntelliJ formatting for now :).
@@ -1,5 +1,25 @@ | |||
footer > img#logo { | |||
// Add support for external anchor icons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This "style" of writing sounds like an XXX to me. WDYT about changing it to: "Adds support for...". Not sure if that is the right way to go, but maybe it makes more sense 🤔.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think such comments are similar to in-code comments (Java example) which can carry the same mood. It is just a hard-to-explain feeling, but to me the style of 'Adds' is a bit awkward in this context and feels more fitting in JavaDoc-type of comments. 😅 But I'd be happy to change this, but then it should be applied in other places too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could meet in the middle and use /*
-style comments here? No strong opinion though. (I agree that the grammar is correct as-is!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a difference in behavior between //
-style and /*
style commments, though. //
do not get compiled to CSS and /*
do end up in the compiled CSS. See SASS documentation. Not sure whether it is worth it while sending more bytes over the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL! Agree that we can then leave it as-is.
To answer many of your questions @rickie. Many changes originate from @oxkitsune and @japborst in the Edit: However, likely |
Looks good. No mutations were possible for these changes. |
2 similar comments
Looks good. No mutations were possible for these changes. |
Looks good. No mutations were possible for these changes. |
&:first-of-type { | ||
margin-left: 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@japborst is this change still necessary? It renders fine without for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reduces the margins when you have multiple labels. What do you mean with "renders fine"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should be more specific. My human eye can't see the difference.
It seems that the lines above with !important
override the behavior. Perhaps we should change this entire section to:
.label {
margin-left: 0 !important;
}
But maybe there is a more proper way to do this such that we don't need !important
, but I am no CSS expert either 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, added a commit for this suggestion and updated the comment next to it.
Looks good. No mutations were possible for these changes. |
@@ -0,0 +1 @@ | |||
<!-- This file removes the just-the-docs reference in the nav bar's footer. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we want to remove it? It's OSS software and don't see why we would remove the reference to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's what we did on the website branch, I believe because we thought it to be cleaner at the time. I am fine with removing it to give some credits, if others agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't recall adding this, but might have just forgotten. Let's add it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added back.
&:first-of-type { | ||
margin-left: 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reduces the margins when you have multiple labels. What do you mean with "renders fine"?
The build fails for reasons unrelated to this PR; we should merge #410 first. (I'll review this PR once a few approvals are in, since I'm not an expert on this stuff.) |
783fb77
to
1e98ce5
Compare
Rebased. |
Looks good. No mutations were possible for these changes. |
@rickie it seems like we can't delete |
Looks good. No mutations were possible for these changes. |
1 similar comment
Looks good. No mutations were possible for these changes. |
Based on the documentation link, shouldn't we also add So IIUC if we would merge this while it's red, it should turn green after it's on master and an actual link right? So now it will complain because it doesn't exist yet? |
Looks good. No mutations were possible for these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the documentation link, shouldn't we also add
type="image/x-icon">
to the favicon line?
I can't quickly find a clear answer what it is used for, but can't hurt to add. Added it.
So IIUC if we would merge this while it's red, it should turn green after it's on master and an actual link right? So now it will complain because it doesn't exist yet?
As discussed offline, no it probably will not turn green. The reference to /favicon.ico
in the head
is added by either Jekyll or just-the-docs
, our reference to /assets/images/favicon.ico
in head_custom
is appended to the the head
, causing the favicon link to be overwritten. I found no way of removing the former link. As discussed, I now excluded /favicon.ico
from validation.
@@ -28,7 +28,7 @@ jobs: | |||
working-directory: ./website | |||
# XXX: Drop `--disable_external true` once we fully adopted the | |||
# "Refaster rules" terminology on our website and in the code. | |||
run: bundle exec htmlproofer --disable_external true --check-external-hash false ./_site |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Execution of htmlproofer
will eventually live in a Ruby script instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The favicon.ico
should be in the root for best browser support, sorry 😕 The error was actually correct by htmlproofer
😉
See here for more details https://realfavicongenerator.net/faq#why_icons_in_root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
As discussed offline, we had the root |
Ready for your eyes @Stephan202. |
Looks good. No mutations were possible for these changes. |
cd13d3e
to
7f36364
Compare
Rebased. |
Looks good. No mutations were possible for these changes. |
Rebased. |
7f36364
to
873545c
Compare
Looks good. No mutations were possible for these changes. |
(Didn't forget about this PR; will certainly find a moment in the coming days.) |
Co-authored-by: Rick Ossendrijver <[email protected]>
Co-authored-by: Rick Ossendrijver <[email protected]>
As opposed to having a custom link to `/assets/images/favicon.ico`.
873545c
to
b670c93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased and added a small commit. Left a few questions, and didn't scrutinize the CSS too much, but LGTM :)
website/_config.yml
Outdated
@@ -36,6 +42,7 @@ social: | |||
- https://github.com/PicnicSupermarket | |||
- https://twitter.com/picnic | |||
- https://www.linkedin.com/company/picnictechnologies | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd omit this empty line, because the twitter
section below is also part of the SEO config mentioned above.
callouts: | ||
summary: | ||
color: blue | ||
note: | ||
color: grey-dk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking: this will only be used in the next PR, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. All changes in this PR won't be effective on master
yet but are (almost all -- cases where we didn't, I tested locally against the website
branch) already present on the website
branch and therefore deployed. After @rickie's docgen modules, I'll open a PR to move the Ruby templating logic and a subsequent PR to change the GHA logic.
@@ -1,5 +1,25 @@ | |||
footer > img#logo { | |||
// Add support for external anchor icons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could meet in the middle and use /*
-style comments here? No strong opinion though. (I agree that the grammar is correct as-is!)
$grey-dk-000: $grey-lt-000; | ||
$grey-dk-100: $grey-lt-100; | ||
$grey-dk-200: $grey-lt-200; | ||
$grey-dk-250: $grey-lt-200; | ||
$grey-dk-300: $grey-lt-300; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking: only 250 having an "off' mapping is intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is based on the colors defined by just-the-docs
. I believe the idea was for the summary
boxes to be light instead of dark in a dark theme, as otherwise it does not stand out as much. As you can see, the light grays only contain 4 entries instead of 5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow 😄 (Maybe worth a comment; not sure.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Added a comment 👍.
Looks good. No mutations were possible for these changes. |
Looks good. No mutations were possible for these changes. |
Looks good. No mutations were possible for these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one more commit. Updated suggested commit message (IIUC there aren't really asset changes here):
Update website styling and add Google site verification (#408)
@@ -1,5 +1,25 @@ | |||
footer > img#logo { | |||
// Add support for external anchor icons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL! Agree that we can then leave it as-is.
Extracted from the
website
branch. Therefore, this is effectively already applied apart from a single selective tweak to which I added a comment.As review, please make sure I included everything in scope. Considered out of scope:
docgen
) from source code using a compiler plugin.docgen
to template the Markdown pages.Suggested commit message (feel free to tweak):
Also credits to @oxkitsune and @japborst as authors for some of these changes.