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

chore: small styles and quality of life improvements #2058

Merged
merged 13 commits into from
Nov 4, 2024

Conversation

bartsmykla
Copy link
Contributor

@bartsmykla bartsmykla commented Nov 4, 2024

  1. Sticky version selector and search bar

    image

  2. Fixed / Improved Copy to Clipboard in code blocks

    Screen.Recording.2024-11-04.at.11.38.22.mov
  3. Fixed padding in line numbers 10+

    image

  4. Improved version warning block

    image

  5. Fixed issues with scrolling active sidebar link to view, where it was manipulating global scroll, not only sidebar scroll

  6. Improved development workflow in multiple ways


Did you sign your commit? Instructions: 👍

Have you read Contributing guidelines?: 👍

styles source maps in dev are very helpful during development

`css.preprocessorOptions.scss.additionalData` needs to be a string or a
function, so having array was wrong and did't work with `devSourcemap`
setting.

modern scss compiler api is just a suggested by sass and legacy api will
be sooner or later removed.

Signed-off-by: Bart Smykla <[email protected]>
adding `_assets/styles/` directory to excluded allows vite to handle
sass files compilation and when developing won't cause jekyll to hard
refresh page whenever styles changes and allow vite to hot reload just
styles

Signed-off-by: Bart Smykla <[email protected]>
`this.sidebarButton` is null for some pages, like 404

Signed-off-by: Bart Smykla <[email protected]>
1. `vite` is minifying scripts and styles during production builds so it
   was unnecessary to import minified versions. Importing minified
   versions was causing that it was harded to debug styles/scripts during
   developement
2. plugin `prism-show-language` was not used, and it was imported before
   `prism-toolbar` which was causing it was not even working and logging
   warninng message in console
3. we are not using `prism-tomorrow` theme
4. moving out copy icon html elements and formated it with new lines
   made it a little bit easier to read

Signed-off-by: Bart Smykla <[email protected]>
1. `expandActiveGroup` was incorrectly closing groups which were nested
   more than one level - this commit fixes that
2. smoth scrolling to sidebar element was broken when there was not
   enough scroll height to show the active link in the middle. In such
   cases it was moving down global page scroll with the missing height value
3. small refactoring of `setActiveLink` method

Signed-off-by: Bart Smykla <[email protected]>
1. now instead of being visible on the left side of the string with a
   type of code (`yaml`, `sh` etc.) when you are hovering over code
   block it's hiding the type string and showing always in the same
   position - top right corner. It was broken before for blocks which
   types were longer than `sh`.
2. added simple fade for the button on hover
3. fixed position of sting "Copied!" when clicked

Signed-off-by: Bart Smykla <[email protected]>
when code block had more than 9 lines it was broken as line numbers 10+ had
not enough padding on the left - not it looks fine for line numbers up
to 99

Signed-off-by: Bart Smykla <[email protected]>
Now, even if sidebar is longer than the screen height, version selector
and search bar will always be present at the top.

This commit also removes this weird unnecessary empty space at the
bottom of the sidebar.

Signed-off-by: Bart Smykla <[email protected]>
1. version alert block now has the same width to the rest of page
2. huge empty space between version alert and the page header was
   shrinked so it looks more natural

Signed-off-by: Bart Smykla <[email protected]>
1. Instead of using raw vite we can use netlify, which we are still
   using otherwise. It also have result that specified by us redirects
   in `_common-redirects` and _redirects` files work.
2. Using netlify instead of vite with its scripts under `bin` directory
   in `Procfile` results in kill signals to properly propagate so
   `kill-ports` shouldn't be needed
3. I removed unnecessary scripts section from package.json file

Signed-off-by: Bart Smykla <[email protected]>
@bartsmykla bartsmykla requested a review from a team as a code owner November 4, 2024 09:44
@bartsmykla bartsmykla requested review from slonka and Automaat and removed request for a team November 4, 2024 09:44
Copy link

netlify bot commented Nov 4, 2024

Deploy Preview for kuma ready!

Name Link
🔨 Latest commit 05e639e
🔍 Latest deploy log https://app.netlify.com/sites/kuma/deploys/6728b20c8c53d8000872cc9b
😎 Deploy Preview https://deploy-preview-2058--kuma.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 92 (🟢 up 16 from production)
Accessibility: 90 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@Automaat
Copy link
Contributor

Automaat commented Nov 4, 2024

There is a lot of frontend stuff here, maybe @johncowen or @schogges can take a look?

Signed-off-by: Bart Smykla <[email protected]>
Copy link
Contributor

@johncowen johncowen left a comment

Choose a reason for hiding this comment

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

LGTM! Great improvements 👏

Copy link
Contributor

@schogges schogges left a comment

Choose a reason for hiding this comment

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

👍 🚀

@bartsmykla bartsmykla merged commit 5917de6 into master Nov 4, 2024
17 checks passed
@bartsmykla bartsmykla deleted the feat/scripts-and-styles-improvements branch November 4, 2024 11:45
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.

4 participants