Skip to content

Site layout refactor - #61

Merged
colegoldsmith merged 22 commits into
mainfrom
site-layout-refactor
Jan 12, 2024
Merged

colegoldsmith merged 22 commits into
mainfrom
site-layout-refactor

Conversation

@colegoldsmith

@colegoldsmith colegoldsmith commented Jan 6, 2024 •

Copy link
Copy Markdown
Collaborator

Lots of updates here, mainly removing a lot of the default UI styles and re-writing the UI template files with tailwind classes. I'll try to list the notable changes:

  • Overhaul and removal of many default UI css files, optimized for tailwind
  • Overhaul the left nav and top nav. It now uses a drawer style component for the mobile view
  • Left nav is refactored an restyled to allow deeply nested items
  • Page content is now centered on wide screens
  • Page content is optimized to squish as little as possible for each screen width breakpoint
  • Removal of stylelint as it is now unsupported and clashes with prettier.
Screenshot 2024-01-10 at 12 39 38 PM

* new site layout with an animated drawer
* put base rem back to 16px
* shifting hbs templates around to match new structure better
@mlr

mlr commented Jan 6, 2024

Copy link
Copy Markdown
Contributor

UI bundle preview build failure! ❌

[06:46:15] Using gulpfile ~/work/docs-ui/docs-ui/gulpfile.js [06:46:15] Starting 'lint'... [06:46:15] Starting 'lint:css'... [06:46:15] Starting 'lint:js'... [06:46:17] /home/runner/work/docs-ui/docs-ui/src/js/01-nav.js 115:1 warning This line has a length of 122. Maximum allowed is 120 max-len ✖ 1 problem (0 errors, 1 warning) [06:46:17] Finished 'lint:js' after 1.92 s [06:46:18] src/css/doc.css 1093:136 ✖ Expected single space before "{" block-opening-brace-space-before src/css/docsearch.css 109:27 ✖ Expected newline after ":" with a multi-line declaration declaration-colon-newline-after [06:46:18] 'lint:css' errored after 2.7 s [06:46:18] �[31mError�[39m in plugin "�[36mgulp-stylelint�[39m" Message: Failed with 2 errors [06:46:18] 'lint' errored after 2.7 s

@mlr

mlr commented Jan 6, 2024

Copy link
Copy Markdown
Contributor

Antora site build failure! ❌

[06:46:42] Using gulpfile ~/work/datastax-docs-site/datastax-docs-site/ui-bundle-preview/gulpfile.js [06:46:42] Starting 'bundle'... [06:46:42] Starting 'clean'... [06:46:42] Finished 'clean' after 21 ms [06:46:42] Starting 'lint:css'... [06:46:42] Starting 'lint:js'... [06:46:45] /home/runner/work/datastax-docs-site/datastax-docs-site/ui-bundle-preview/src/js/01-nav.js 115:1 warning This line has a length of 122. Maximum allowed is 120 max-len ✖ 1 problem (0 errors, 1 warning) [06:46:45] Finished 'lint:js' after 2.79 s [06:46:46] src/css/doc.css 1093:136 ✖ Expected single space before "{" block-opening-brace-space-before src/css/docsearch.css 109:27 ✖ Expected newline after ":" with a multi-line declaration declaration-colon-newline-after [06:46:46] 'lint:css' errored after 3.82 s [06:46:46] �[31mError�[39m in plugin "�[36mgulp-stylelint�[39m" Message: Failed with 2 errors [06:46:46] 'bundle' errored after 3.85 s

@mlr

mlr commented Jan 6, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 6, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@mlr

mlr commented Jan 8, 2024

Copy link
Copy Markdown
Contributor

UI bundle preview build failure! ❌

[19:06:15] Using gulpfile ~/work/docs-ui/docs-ui/gulpfile.js [19:06:15] Starting 'lint'... [19:06:15] Starting 'lint:css'... [19:06:15] Starting 'lint:js'... [19:06:17] /home/runner/work/docs-ui/docs-ui/src/js/02-on-this-page.js 36:1 warning This line has a length of 167. Maximum allowed is 120 max-len ✖ 1 problem (0 errors, 1 warning) [19:06:17] Finished 'lint:js' after 1.89 s [19:06:18] src/css/doc.css 1093:136 ✖ Expected single space before "{" block-opening-brace-space-before [19:06:18] 'lint:css' errored after 2.61 s [19:06:18] �[31mError�[39m in plugin "�[36mgulp-stylelint�[39m" Message: Failed with 1 error [19:06:18] 'lint' errored after 2.61 s

@mlr

mlr commented Jan 8, 2024

Copy link
Copy Markdown
Contributor

Antora site build failure! ❌

[19:06:50] Using gulpfile ~/work/datastax-docs-site/datastax-docs-site/ui-bundle-preview/gulpfile.js [19:06:50] Starting 'bundle'... [19:06:50] Starting 'clean'... [19:06:50] Finished 'clean' after 19 ms [19:06:50] Starting 'lint:css'... [19:06:50] Starting 'lint:js'... [19:06:52] /home/runner/work/datastax-docs-site/datastax-docs-site/ui-bundle-preview/src/js/02-on-this-page.js 36:1 warning This line has a length of 167. Maximum allowed is 120 max-len ✖ 1 problem (0 errors, 1 warning) [19:06:52] Finished 'lint:js' after 2.33 s [19:06:53] src/css/doc.css 1093:136 ✖ Expected single space before "{" block-opening-brace-space-before [19:06:53] 'lint:css' errored after 3.28 s [19:06:53] �[31mError�[39m in plugin "�[36mgulp-stylelint�[39m" Message: Failed with 1 error [19:06:53] 'bundle' errored after 3.3 s

@mlr

mlr commented Jan 8, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 8, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@mlr

mlr commented Jan 8, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 8, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@mlr

mlr commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

@mlr

mlr commented Jan 9, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 9, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

Comment thread gulpfile.js
call: task.remove(['build', 'public']),
})

const lintCssTask = createTask({

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I decided to remove stylelint for the project. It's no longer maintained and was causing some headaches with prettier. And now that we have prettier I feel that is a good replacement, though it would be ideal to add a step in the gulp process to run prettier on our css files to keep things consistent much like stylelint was doing. Let's handle that later

@mlr

mlr commented Jan 9, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 9, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@mlr

mlr commented Jan 9, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 9, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@mlr

mlr commented Jan 9, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@djsauble

Copy link
Copy Markdown

@djsauble

Copy link
Copy Markdown

@colegoldsmith It looks like page content is centered only on pages without a TOC. Again, I'd like @kurtenj to chime in here, but the transition between pages with a TOC and pages without a TOC is a bit jarring because the horizontal position of the content changes depending on which kind of page you're viewing.

With a TOC:
Screenshot 2024-01-10 at 11 29 26 AM

Without a TOC:
Screenshot 2024-01-10 at 11 29 24 AM

@djsauble

Copy link
Copy Markdown

@colegoldsmith @kurtenj The spacing between 1) the breadcrumb and title, and 2) the title and time commitment indicator, feels a bit cramped compared to the old layout.

Old layout:

Screenshot 2024-01-10 at 11 33 09 AM

New layout:

Screenshot 2024-01-10 at 11 33 20 AM

@eric-schneider

Copy link
Copy Markdown
Contributor

+1 to all of @djsauble's points. @colegoldsmith I'll let you be the judge of what should be addressed pre- or post-merge.

@colegoldsmith It looks like we've lost the ability to scroll the right nav. See https://fantastic-adventure-593lpwy.pages.github.io/site-layout-refactor/astra-db-vector/clients/python.html#paginate-the-results-from-a-search

^ regarding the above feedback item, I also noticed that the page TOC (right nav) no longer highlight's the current section as I scroll. Might be a symptom of the same underlying issue, but wanted to call it out specifically just in case.

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@colegoldsmith

Copy link
Copy Markdown
Collaborator Author

Thanks @djsauble I've fixed the following issues you mentioned:

  • ToC was not scrollable. I added overflow to it.
  • Page content jumped around when no ToC. I fixed this by making the space for the ToC always visible.
  • Page header and breadcrumbs were too tight. I added padding

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@djsauble

Copy link
Copy Markdown

Great improvement, thanks!

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 11, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@mlr

mlr commented Jan 12, 2024 •

Copy link
Copy Markdown
Contributor

UI bundle preview build successful! ✅
Deploying preview to GitHub Pages.
Deployment successful! View preview

@mlr

mlr commented Jan 12, 2024 •

Copy link
Copy Markdown
Contributor

Antora site build successful! ✅
Deploying draft to GitHub Pages.
Deployment successful! View draft

@colegoldsmith
colegoldsmith merged commit 00d74bd into main Jan 12, 2024
@colegoldsmith
colegoldsmith deleted the site-layout-refactor branch January 12, 2024 00:31
eric-schneider added a commit that referenced this pull request Nov 19, 2026
An SVG image whose file sets no width, such as one with only a viewBox
or with width="100%", rendered at 0x0 and disappeared from the page.
That holds for a block image, for an SVG embedded with an <object> tag
for interactivity, and for inline SVG.

Stretch a block image's content box to the full width of the block and
align the image inside it with text-align, as upstream's fcb2110 does.
An SVG without a width then fills the column in Chromium, WebKit and
Firefox, and the text-left and text-right roles still align narrower
images.

Upstream also sizes an <object> SVG that has no width attribute with
width: fit-content (f96f0fb), a rule docs-ui dropped in #61. It stays
out: with the stretched content box it changes nothing in Chromium,
and it shrinks such an SVG to the default object size in WebKit and to
nothing in Firefox.
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