Skip to content

Commit

Permalink
Merge branch 'master' into slorber/lazy-sidebar-rendering
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/docusaurus-theme-common/src/utils/useCollapsible.tsx
  • Loading branch information
slorber committed Jul 14, 2021
2 parents fe5f9bd + 2bd7f0d commit d94cea5
Show file tree
Hide file tree
Showing 18 changed files with 244 additions and 154 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@babel/plugin-proposal-optional-chaining": "^7.12.16",
"@babel/plugin-transform-modules-commonjs": "^7.12.13",
"@babel/preset-typescript": "^7.12.16",
"@crowdin/cli": "^3.5.3",
"@crowdin/cli": "^3.6.4",
"@formatjs/intl-datetimeformat": "^3.2.12",
"@formatjs/intl-numberformat": "^6.2.2",
"@formatjs/intl-pluralrules": "^4.0.11",
Expand Down
10 changes: 5 additions & 5 deletions packages/docusaurus-theme-classic/codeTranslations/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"theme.SearchPage.inputLabel": "সার্চ",
"theme.SearchPage.inputPlaceholder": "আপনার অনুসন্ধান এখানে টাইপ করুন",
"theme.SearchPage.noResultsText": "কোন ফলাফল পাওয়া যায়নি",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.TOCCollapsible.toggleButtonLabel": "এই পেজ এ রয়েছে",
"theme.blog.paginator.navAriaLabel": "ব্লগ তালিকা পেজ নেভিগেশন",
"theme.blog.paginator.newerEntries": "নতুন এন্ট্রি",
"theme.blog.paginator.olderEntries": "পুরানো এন্ট্রি",
Expand All @@ -30,14 +30,14 @@
"theme.blog.post.plurals": "একটি পোস্ট|{count} পোস্টস",
"theme.blog.post.readMore": "আরও পড়ুন",
"theme.blog.post.readingTime.plurals": "এক মিনিট পড়া|{readingTime} মিনিট পড়া",
"theme.blog.sidebar.navAriaLabel": "Blog recent posts navigation",
"theme.blog.sidebar.navAriaLabel": "সাম্প্রতিক ব্লগ পোস্ট নেভিগেশন",
"theme.blog.tagTitle": "{nPosts} সঙ্গে ট্যাগ্গেড \"{tagName}\" ",
"theme.common.editThisPage": "এই পেজটি এডিট করুন",
"theme.common.headingLinkTitle": "হেডিং এর সঙ্গে সরাসরি লিংকড",
"theme.common.skipToMainContent": "স্কিপ করে মূল কন্টেন্ট এ যাও",
"theme.common.skipToMainContent": "স্কিপ করে মূল কন্টেন্ট এ যান",
"theme.docs.paginator.navAriaLabel": "ডক্স পৃষ্টাগুলির নেভিগেশন",
"theme.docs.paginator.next": "পরবর্তী",
"theme.docs.paginator.previous": "আগে",
"theme.docs.paginator.previous": "পূর্ববর্তী",
"theme.docs.sidebar.collapseButtonAriaLabel": "সাইডবারটি সঙ্কুচিত করুন",
"theme.docs.sidebar.collapseButtonTitle": "সাইডবারটি সঙ্কুচিত করুন",
"theme.docs.sidebar.expandButtonAriaLabel": "সাইডবারটি প্রসারিত করুন",
Expand All @@ -49,7 +49,7 @@
"theme.lastUpdated.atDate": " {date} তারিখে",
"theme.lastUpdated.byUser": "{user} দ্বারা",
"theme.lastUpdated.lastUpdatedAtBy": "সর্বশেষ সংষ্করণ{atDate}{byUser}",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "Back to main menu",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "মেন মেনুতে যান",
"theme.tags.tagsListLabel": "ট্যাগ্স:",
"theme.tags.tagsPageLink": "সমস্ত ট্যাগ্স দেখুন",
"theme.tags.tagsPageTitle": "ট্যাগ্স"
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-theme-classic/codeTranslations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"theme.SearchPage.inputLabel": "Chercher",
"theme.SearchPage.inputPlaceholder": "Tapez votre recherche ici",
"theme.SearchPage.noResultsText": "Aucun résultat trouvé",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.TOCCollapsible.toggleButtonLabel": "Sur cette page",
"theme.blog.paginator.navAriaLabel": "Pagination de la liste des articles du blog",
"theme.blog.paginator.newerEntries": "Nouvelles entrées",
"theme.blog.paginator.olderEntries": "Anciennes entrées",
Expand Down Expand Up @@ -49,7 +49,7 @@
"theme.lastUpdated.atDate": " le {date}",
"theme.lastUpdated.byUser": " par {user}",
"theme.lastUpdated.lastUpdatedAtBy": "Dernière mise à jour{atDate}{byUser}",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "Back to main menu",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "Retour au menu principal",
"theme.tags.tagsListLabel": "Tags :",
"theme.tags.tagsPageLink": "Voir tous les tags",
"theme.tags.tagsPageTitle": "Tags"
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-theme-classic/codeTranslations/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"theme.SearchPage.inputLabel": "חיפוש",
"theme.SearchPage.inputPlaceholder": "הקלד כאן לחיפוש",
"theme.SearchPage.noResultsText": "לא נמצאו תוצאות",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.TOCCollapsible.toggleButtonLabel": "בעמוד זה",
"theme.blog.paginator.navAriaLabel": "רשימת דפי הבלוג",
"theme.blog.paginator.newerEntries": "הכי חדש",
"theme.blog.paginator.olderEntries": "ישן יותר",
Expand All @@ -30,7 +30,7 @@
"theme.blog.post.plurals": "רשומה אחת|{count} רשומות|{count} רשומות|{count} רשומות",
"theme.blog.post.readMore": "קרא עוד...",
"theme.blog.post.readingTime.plurals": "דקת קריאה|{readingTime} דקות קריאה|{readingTime} דקות קריאה|{readingTime} דקות קריאה",
"theme.blog.sidebar.navAriaLabel": "Blog recent posts navigation",
"theme.blog.sidebar.navAriaLabel": "מעבר לרשומות אחרונות בבלוג",
"theme.blog.tagTitle": "{nPosts} עם התגית \"{tagName}\"",
"theme.common.editThisPage": "ערוך דף זה",
"theme.common.headingLinkTitle": "קישור ישיר לכותרת",
Expand All @@ -49,7 +49,7 @@
"theme.lastUpdated.atDate": " בתאריך {date}",
"theme.lastUpdated.byUser": " על ידי {user}",
"theme.lastUpdated.lastUpdatedAtBy": "עודכן{atDate}{byUser}",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "Back to main menu",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "חזרה לתפריט הראשי",
"theme.tags.tagsListLabel": "תגיות:",
"theme.tags.tagsPageLink": "כל התגיות",
"theme.tags.tagsPageTitle": "תגיות"
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-theme-classic/codeTranslations/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"theme.SearchPage.inputLabel": "खोज करें",
"theme.SearchPage.inputPlaceholder": "अपनी खोज यहाँ टाइप करें",
"theme.SearchPage.noResultsText": "कोई परिणाम नहीं मिलें",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.TOCCollapsible.toggleButtonLabel": "इस पेज पर",
"theme.blog.paginator.navAriaLabel": "ब्लॉग सूची पेज नेविगेशन",
"theme.blog.paginator.newerEntries": "नए एंट्रीज़",
"theme.blog.paginator.olderEntries": "पुराने एंट्रीज़",
Expand All @@ -30,7 +30,7 @@
"theme.blog.post.plurals": "एक पोस्ट|{count} पोस्ट",
"theme.blog.post.readMore": "और पढ़ें",
"theme.blog.post.readingTime.plurals": "एक मिनट में पढ़ें|{readingTime} मिनट में पढ़ें",
"theme.blog.sidebar.navAriaLabel": "Blog recent posts navigation",
"theme.blog.sidebar.navAriaLabel": "नया ब्लॉग पोस्ट नेविगेशन",
"theme.blog.tagTitle": "{nPosts} पोस्ट \"{tagName}\" टैग के साथ",
"theme.common.editThisPage": "इस पेज को बदलें",
"theme.common.headingLinkTitle": "शीर्षक का सीधा लिंक",
Expand All @@ -49,7 +49,7 @@
"theme.lastUpdated.atDate": " {date} पर",
"theme.lastUpdated.byUser": " {user} द्वारा",
"theme.lastUpdated.lastUpdatedAtBy": "आखरी अपडेट{atDate}{byUser}",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "Back to main menu",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "मुख्य मेनू में वापस जाएं",
"theme.tags.tagsListLabel": "टैग:",
"theme.tags.tagsPageLink": "सारे टैग देखें",
"theme.tags.tagsPageTitle": "टैग"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"theme.SearchPage.inputLabel": "搜索",
"theme.SearchPage.inputPlaceholder": "在此输入搜索字词",
"theme.SearchPage.noResultsText": "未找到任何结果",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.TOCCollapsible.toggleButtonLabel": "本页总览",
"theme.blog.paginator.navAriaLabel": "博文列表分页导航",
"theme.blog.paginator.newerEntries": "较新的博文",
"theme.blog.paginator.olderEntries": "较旧的博文",
Expand All @@ -30,7 +30,7 @@
"theme.blog.post.plurals": "{count} 篇博文",
"theme.blog.post.readMore": "阅读更多",
"theme.blog.post.readingTime.plurals": "{readingTime} 分钟阅读",
"theme.blog.sidebar.navAriaLabel": "Blog recent posts navigation",
"theme.blog.sidebar.navAriaLabel": "最近博文导航",
"theme.blog.tagTitle": "{nPosts} 含有标签「{tagName}」",
"theme.common.editThisPage": "编辑此页",
"theme.common.headingLinkTitle": "标题的直接链接",
Expand All @@ -49,7 +49,7 @@
"theme.lastUpdated.atDate": "于 {date} ",
"theme.lastUpdated.byUser": "由 {user} ",
"theme.lastUpdated.lastUpdatedAtBy": "最后{byUser}{atDate}更新",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "Back to main menu",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "回到主菜单",
"theme.tags.tagsListLabel": "标签:",
"theme.tags.tagsPageLink": "查看所有标签",
"theme.tags.tagsPageTitle": "标签"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"theme.SearchPage.inputLabel": "搜尋",
"theme.SearchPage.inputPlaceholder": "在此輸入搜尋字詞",
"theme.SearchPage.noResultsText": "未找到任何結果",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.TOCCollapsible.toggleButtonLabel": "本頁導覽",
"theme.blog.paginator.navAriaLabel": "部落格文章列表分頁導覽",
"theme.blog.paginator.newerEntries": "較新的文章",
"theme.blog.paginator.olderEntries": "較舊的文章",
Expand All @@ -30,7 +30,7 @@
"theme.blog.post.plurals": "{count} 篇文章",
"theme.blog.post.readMore": "閱讀更多",
"theme.blog.post.readingTime.plurals": "{readingTime} 分鐘閱讀",
"theme.blog.sidebar.navAriaLabel": "Blog recent posts navigation",
"theme.blog.sidebar.navAriaLabel": "最近部落格文章導覽",
"theme.blog.tagTitle": "{nPosts} 含有標籤「{tagName}」",
"theme.common.editThisPage": "編輯此頁",
"theme.common.headingLinkTitle": "標題的直接連結",
Expand All @@ -49,7 +49,7 @@
"theme.lastUpdated.atDate": "於 {date} ",
"theme.lastUpdated.byUser": "由 {user} ",
"theme.lastUpdated.lastUpdatedAtBy": "最後{byUser}{atDate}更新",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "Back to main menu",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "回到主菜單",
"theme.tags.tagsListLabel": "標籤:",
"theme.tags.tagsPageLink": "查看所有標籤",
"theme.tags.tagsPageTitle": "標籤"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,14 @@ function DocSidebarItemCategory({
'menu__link--active': collapsible && isActive,
[styles.menuLinkText]: !collapsible,
})}
onClick={collapsible ? toggleCollapsed : undefined}
onClick={
collapsible
? (e) => {
e.preventDefault();
toggleCollapsed();
}
: undefined
}
href={collapsible ? '#' : undefined}
{...props}>
{label}
Expand Down
Loading

0 comments on commit d94cea5

Please sign in to comment.