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

[PM-7918] Design Feedback and other cleanup #136

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"collapsed": true,
"label": "Create",
"link": {
"type": "generated-index",
"description": "Common patterns for account creation forms"
},
"collapsed": false
"position": 5
}
3 changes: 2 additions & 1 deletion client/docs/forms/identity/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"collapsed": true,
"label": "Identity",
"link": {
"type": "generated-index",
"description": "Common patterns for identity forms"
},
"collapsed": false
"position": 2
}
4 changes: 2 additions & 2 deletions client/docs/forms/login/_category_.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"collapsed": false,
"label": "Login",
"position": 1,
"link": {
"type": "generated-index",
"description": "Common patterns for login forms"
},
"collapsed": false
"position": 1
}
3 changes: 2 additions & 1 deletion client/docs/forms/payment/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"collapsed": true,
"label": "Payment",
"link": {
"type": "generated-index",
"description": "Common patterns for payment forms"
},
"collapsed": false
"position": 3
}
3 changes: 2 additions & 1 deletion client/docs/forms/search/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"collapsed": true,
"label": "Search",
"link": {
"type": "generated-index",
"description": "Common patterns for search inputs"
},
"collapsed": false
"position": 4
}
3 changes: 2 additions & 1 deletion client/docs/forms/update/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"collapsed": true,
"label": "Update",
"link": {
"type": "generated-index",
"description": "Common patterns for authentication update forms"
},
"collapsed": false
"position": 6
}
1 change: 1 addition & 0 deletions client/src/pages/index.md → client/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Intro
displayed_sidebar: formsSidebar
---

# Let's test the web!
Expand Down
4 changes: 4 additions & 0 deletions client/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ const config: Config = {
{
docs: {
breadcrumbs: false,
// @TODO there is a known issue where docs `routeBasePath` set to "/" breaks 404 pages
// https://github.com/facebook/docusaurus/issues/9665
// https://github.com/facebook/docusaurus/issues/9688
Comment on lines +55 to +56
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussion on both facebook/docusaurus#9665 and facebook/docusaurus#9688 offers some workarounds, but they didn't work well here without a lot of extra refactors which I opted not to get into here.


routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
},
Expand Down
24 changes: 0 additions & 24 deletions client/sidebars.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation

The sidebars can be generated from the filesystem, or explicitly defined here.

Create as many sidebars as you want.
*/

// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
formsSidebar: [{ type: "autogenerated", dirName: "forms" }],

// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};

module.exports = sidebars;
17 changes: 5 additions & 12 deletions client/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,18 @@
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

.theme-doc-markdown > header:first-of-type details > summary {
list-style: none;
}
.theme-doc-markdown > header:first-of-type details > summary::after {
font-size: 24px;
content: " ▸";
}
.theme-doc-markdown > header:first-of-type details[open] > summary::after {
font-size: 24px;
content: " ▾";
}
Comment on lines -62 to -72
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Leftover styling from 26a4ff2


.theme-doc-markdown > header:first-of-type h1:first-of-type {
display: inline-block;
cursor: pointer;
font-size: 24px;
margin-bottom: 5px;
}

main [class^="docItemCol_"],
main [class*=" docItemCol_"] {
margin: auto;
}

select,
input:not([type]), /* text type is stripped from built html */
input[type="url"],
Expand Down
10 changes: 0 additions & 10 deletions client/src/theme/Navbar/Search/index.js
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No longer needed thanks to facebook/docusaurus#10061 in v3.3.0

This file was deleted.

31 changes: 0 additions & 31 deletions client/src/theme/Navbar/Search/styles.module.css

This file was deleted.