Alexey Pyltsyn
237d1a31f5
fix(v2): introduce useCollapsible to fix collapsible animation perf issues ( #5116 )
...
* fix(v2): avoid slowdown transition with huge sidebar items
* move useCollapsible to theme-common
* @docusaurus/theme-classic => watch mode should include type-checking
* refactor useCollapsible => encapsulate more behavior / state / ref inside it, making code simpler for component using it
* useCollapseAnimation => animate DOM properties directly instead of using React inline styles => optimize perf from 4 render per click to 1 render per click
* add missing items in deps array
* rename ref to collapsibleRef
* lint
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-07 18:50:13 +02:00
Sébastien Lorber
d65cc9d23f
fix(v2): fix SkipToContent programmatic focus when updating querystring ( #5104 )
2021-06-30 19:37:40 +02:00
Sébastien Lorber
1ec2c95e3d
chore(v2): prepare v2.0.0-beta.3 release ( #5098 )
...
* beta.3
* publish guide
* publish guide
* v2.0.0-beta.3
2021-06-30 16:05:49 +02:00
Adam Uhlíř
823b020c34
fix(v2): classic theme - semantic correct anchors links ( #5080 )
...
* fix(v2): semantic correct anchors
* chore: ignore linting
2021-06-30 15:24:03 +02:00
Alexey Pyltsyn
1cecd78f25
feat(v2): add icon to external footer links ( #5092 )
2021-06-30 10:54:26 +02:00
Alexey Pyltsyn
7fe2a9891d
fix(v2): restore previous scroll position on back button click ( #5081 )
2021-06-29 15:31:25 +02:00
Alexey Pyltsyn
5883e2b245
fix(v2): restore responsive menu ( #5063 )
2021-06-25 15:19:23 +02:00
Sébastien Lorber
ec2486d2c9
chore(v2): prepare v2.0.0-beta.2 release ( #5056 )
...
* prepare beta.2
* v2.0.0-beta.2
2021-06-24 19:39:37 +02:00
Joshua Chen
462b1cf2bc
style(v2): reduce number of ESLint warnings ( #4993 )
...
* Initial work
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More fixes
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Update packages/docusaurus-theme-bootstrap/src/theme/ThemedImage/index.tsx
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Fix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Replace versionPathPart with function
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Prefer non-null assertions
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Substitute for-of with forEach
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fill `catch` block with placeholder comment
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Ignore local require
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert global require change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Tighten eslint disable range
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Make eslint ignore examples and more tolerating to templates
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use reduce to handle doc items sequentially
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert "Use reduce to handle doc items sequentially"
This reverts commit c7525d463b
.
* Address change requests
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-24 18:12:48 +02:00
Sébastien Lorber
364051f232
feat(v2): docs version banner configuration option ( #5052 )
...
* refactor DocVersionBanner => versionMetadata prop should be forwarded instead of using "useActiveVersion" + global data
* docs version banner configuration
* add doc for versions.banner
* fix tests
* improve docs plugin option api doc
2021-06-24 18:04:16 +02:00
Alexey Pyltsyn
aa79387e12
fix(v2): add shadow to skip link on hover only ( #5050 )
2021-06-24 15:02:44 +02:00
Sébastien Lorber
9916a0b4a4
fix(v2): Fix announcementBar layout shifts ( #5040 )
...
* Fix announcementBar layout shift
* useAnnouncementBar should return correct state after hydration
* refactor announcementBar => move utils to theme-common
* restore previous announcementBar
* typo
2021-06-24 11:35:35 +02:00
Sébastien Lorber
7e55aa10a6
fix(v2): fix some docs container/sidebar layout issues ( #5035 )
2021-06-23 12:32:36 +02:00
Alexey Pyltsyn
8bda3b2dbf
fix(v2): ignore hash changes in useChangeRoute hook ( #5023 )
...
* fix(v2): ignore hash changes in useChangeRoute hook
* refactor and introduce useLocationChange hook
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-22 12:41:58 +02:00
Sébastien Lorber
8d8e5b67e8
chore(v2): prepare v2.0.0-beta.1 release ( #5004 )
...
* beta.1
* v2.0.0-beta.1
2021-06-18 16:54:46 +02:00
Alexey Pyltsyn
7dc9fe839b
chore(v2): update infima to alpha 26 ( #5001 )
2021-06-18 15:03:51 +02:00
Alexey Pyltsyn
0e652730d4
refactor(v2): reduce top padding in doc content container ( #4995 )
2021-06-18 12:21:45 +02:00
Sébastien Lorber
ba65450571
fix(v2): fix theme array deduplication bug ( #5000 )
2021-06-18 11:53:11 +02:00
Alexey Pyltsyn
0bbbfb641b
refactor(v2): readjust footer of blog item ( #4918 )
2021-06-16 16:09:18 +02:00
Sébastien Lorber
4a6de5cf7a
fix(v2): better UX for docsVersionDropdown on mobile when there's a single version, fixes #4932 ( #4986 )
2021-06-16 14:57:01 +02:00
Sébastien Lorber
aa176274be
fix(v2): navbar doc item should allow older versions to not contain the target doc, as long as the lastVersion contains it ( #4985 )
2021-06-16 13:18:53 +02:00
Alexey Pyltsyn
41d9288e3d
refactor(v2): cleanup console output ( #4979 )
...
* refactor(v2): cleanup console output
* fix jest issue
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-16 11:37:28 +02:00
Alexey Pyltsyn
8501db78a1
fix(v2): make proper data type for prependBaseUrlToHref field ( #4980 )
2021-06-16 11:06:25 +02:00
Alexey Pyltsyn
bfd33dc63a
refactor(v2): minor cleanups ( #4959 )
...
* refactor(v2): minor cleanups
* Fixes
2021-06-16 10:59:50 +02:00
Alexey Pyltsyn
dfe32dac9e
fix(v2): improve accessibility of code blocks ( #4943 )
2021-06-15 16:28:41 +02:00
Alexey Pyltsyn
52f19e15f0
refactor(v2): remove extra padding from doc item container ( #4945 )
2021-06-15 16:15:54 +02:00
Alexey Pyltsyn
57cf20933e
feat(v2): add icon to external navbar links ( #4949 )
...
* feat(v2): add icon to external navbar links
* use isInternalUrl
* Remove demo link
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-15 14:45:53 +02:00
Alexey Pyltsyn
c8b9061f6c
refactor(v2): improve semantic doc sidebar markup ( #4940 )
...
* refactor(v2): improve semantic doc sidebar markup
* Fixes
2021-06-15 12:45:29 +02:00
Alexey Pyltsyn
8629fbdc77
refactor(v2): improve semantic blog sidebar markup ( #4961 )
2021-06-14 19:04:58 +02:00
Pratyay Banerjee
4eb1b58fb0
feat(v2): theme default translations Bengali ( #4939 )
...
* init cleaning v1
• clean copy of base.json
Signed-off : <@Neilblaze>
* update 0.0.1
* update 0.0.2
* update 0.0.3 ~ final review
Added support for BN translations for package
signed off : @Neilblaze <putubanerjee23@gmail.com>
2021-06-10 15:32:29 +02:00
Alexey Pyltsyn
2913bd0fdf
fix(v2): tidy up Markdown page layout ( #4917 )
2021-06-10 15:22:34 +02:00
Sébastien Lorber
df8a900f9c
feat(v2): add trailingSlash config option ( #4908 )
...
* POC: add trailingSlash option
* integrate the preferFoldersOutput option of fork @slorber/static-site-generator-webpack-plugin
* Fix broken links when using trailing slash => using md links is more reliable
* fix TS issue
* minor polish
* fix doc page being sensitive to trailing slashes
* Add tests for applyTrailingSlash
* rename test files
* extract and test applyRouteTrailingSlash
* update snapshot
* add trailing slash config to serve command
* fix getSidebar() => still sensitive to trailing slash setting
* never apply trailing slash to an anchor link
* Add documentation for trailingSlash setting
2021-06-09 19:59:39 +02:00
Alexey Pyltsyn
77264f1eb0
refactor(v2): make doc item layout more semantic ( #4903 )
...
* refactor(v2): make doc item layout more semantic
* Bring back div.markdown
2021-06-09 17:08:36 +02:00
Alexey Pyltsyn
a024d23fda
refactor(v2): reduce vertical space in doc content container ( #4877 )
...
* refactor(v2): reduce vertical space in doc content container
* Avoid to utility class
* Fixes
2021-06-09 16:19:11 +02:00
Alexey Pyltsyn
55e9bd8ac9
refactor(v2): remove type attribute from link and script tags ( #4907 )
...
* refactor(v2): remove type attribute from link and script tags
* minor TS fix
* stylesheets.type => optional
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-09 14:55:47 +02:00
Alexey Pyltsyn
869f4bf206
fix(v2): fix minor a11y issues ( #4906 )
2021-06-09 13:33:08 +02:00
Alexey Pyltsyn
526ce44933
refactor(v2): use SVG for external link icon ( #4914 )
2021-06-09 13:05:13 +02:00
Alexey Pyltsyn
df19bbd145
refactor(v2): replace strong with b in UI components ( #4916 )
2021-06-09 13:02:31 +02:00
Alexey Pyltsyn
2303d6557b
refactor(v2): hide decorative SVGs from screen readers ( #4926 )
2021-06-09 12:25:42 +02:00
Alexey Pyltsyn
f10304dd11
fix(v2): adjust margin after content title ( #4900 )
2021-06-03 19:46:55 +02:00
Sébastien Lorber
57806798c5
fix(v2): fix contentTitle issues when markdown h1 title contains code blocks ( #4882 )
...
* attempt to fix contentTitle issues when markdown h1 title contains inline code blocks
* mention hide_title frontmatter only prevents frontmatter.title from being added in the dom (not a markdown # title in content)
* alwayss insert MainHeading under the div.markdown container for consistency
* ensure MainHeading has no useless id
* revert https://github.com/facebook/docusaurus/pull/4859 as it's now useless: docMeta.title contains the text/frontmatter title in priority over the contentTitle
* fix docs test after revert
* improve markdownParser and fix tests
* fix docs tests
* markdownParser: restore option to remove contentTitle (mostly for blog plugin)
* use removeContentTitle for blog
2021-06-03 17:45:19 +02:00
Alexey Pyltsyn
d2e4e60cd5
refactor(v2): make little better doc details info UI ( #4865 )
2021-06-02 16:19:41 +02:00
Alexey Pyltsyn
35b1941a0b
fix(v2): unbreak adding of custom HTML metadatas ( #4871 )
...
* fix(v2): unbreak adding of custom HTML metadatas
* Correct solution
* Update website/docusaurus.config.js
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-02 12:20:32 +02:00
Alexey Pyltsyn
a9343a1916
fix(v2): adjust padding for custom search box location ( #4856 )
2021-05-28 11:01:26 +03:00
Alexey Pyltsyn
5bc0209f56
chore(v2): update Infima to v0.2.0-alpha.24 ( #4855 )
2021-05-28 10:58:23 +03:00
Alexey Pyltsyn
ff31de0ff6
chore(v2): unlock prism-react-renderer version ( #4834 )
2021-05-21 22:55:51 +03:00
Alexey Pyltsyn
56b6b01cd1
fix(v2): pin prism-react-renderer version to 1.1.1 ( #4830 )
2021-05-21 17:48:36 +03:00
Lior Heber
db6f5ce729
fix(v2): Amend Hebrew translations ( #4819 )
...
Co-authored-by: liorheber <heber.lior@google.com>
2021-05-20 11:03:41 +02:00
Alexey Pyltsyn
6392f88bb6
chore(v2): upgrade dependencies ( #4816 )
2021-05-19 10:11:53 +02:00
nirtamir2
2cd9fd6e27
fix(v2): Fix Hebrew translations ( #4815 )
...
* Update he.json
Change "2" form of plural type to not include 2 number in hebrew
* change Hebrew translation
2021-05-19 10:08:06 +02:00