From e3bbf1a53e4d386030a5efe0e155d14b3e72682c Mon Sep 17 00:00:00 2001 From: Luke Glazebrook <8593744+Glazy@users.noreply.github.com> Date: Tue, 26 Mar 2019 21:05:09 +0000 Subject: [PATCH 1/6] fix(docz-theme-default): mobile menu following anchor clicks (#713) whenever a user clicked an anchor link with the mobile menu open it would cause the mobile menu to re-position itself to half-way off the page --- core/docz-theme-default/src/components/shared/Sidebar/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/core/docz-theme-default/src/components/shared/Sidebar/index.tsx b/core/docz-theme-default/src/components/shared/Sidebar/index.tsx index 57a71d270..bde5de7cf 100644 --- a/core/docz-theme-default/src/components/shared/Sidebar/index.tsx +++ b/core/docz-theme-default/src/components/shared/Sidebar/index.tsx @@ -45,6 +45,7 @@ const Wrapper = styled.div` @media screen and (max-width: ${breakpoints.desktop - 1}px) { transform: translateX(${p => (p.opened ? '-100%' : '0')}); + position: ${p => (p.opened ? 'auto' : 'fixed')}; } ${get('styles.sidebar')}; From 2711e6d406cd8d5fb51ad6fd5e5fa29860b87e95 Mon Sep 17 00:00:00 2001 From: Luke Glazebrook <8593744+Glazy@users.noreply.github.com> Date: Tue, 26 Mar 2019 21:05:33 +0000 Subject: [PATCH 2/6] fix(docz-theme-default): stop nested ul from rendering flat (#714) --- core/docz-theme-default/src/components/ui/UnorderedList.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/docz-theme-default/src/components/ui/UnorderedList.tsx b/core/docz-theme-default/src/components/ui/UnorderedList.tsx index b4ba326a9..c29c2e06d 100644 --- a/core/docz-theme-default/src/components/ui/UnorderedList.tsx +++ b/core/docz-theme-default/src/components/ui/UnorderedList.tsx @@ -13,4 +13,8 @@ export const UnorderedList = styled.ul` } ${get('styles.ul')}; + + ul li { + padding-left: 25px; + } ` From cf0e69fad9e300ae7503acdbffdef36dfe544620 Mon Sep 17 00:00:00 2001 From: Artur Kenzhaev Date: Wed, 27 Mar 2019 00:07:02 +0300 Subject: [PATCH 3/6] chore(docz-theme-default): export enhance from docz-theme-default (#715) --- core/docz-theme-default/src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/docz-theme-default/src/index.tsx b/core/docz-theme-default/src/index.tsx index cafb9beff..bcf95186b 100644 --- a/core/docz-theme-default/src/index.tsx +++ b/core/docz-theme-default/src/index.tsx @@ -16,7 +16,7 @@ const Theme: SFC = ({ children }) => ( ) -const enhance = theme(config, ({ mode, codemirrorTheme, ...config }) => ({ +export const enhance = theme(config, ({ mode, codemirrorTheme, ...config }) => ({ ...config, mode, codemirrorTheme: codemirrorTheme || `docz-${mode}`, From 59a030b2a034a74b8fbc2dd4dbf339ff91f15729 Mon Sep 17 00:00:00 2001 From: Benjamin Gudehus Date: Tue, 26 Mar 2019 22:07:54 +0100 Subject: [PATCH 4/6] chore(docz-theme-default): search icon and sidebar top border. (#721) --- core/docz-theme-default/src/components/shared/Logo/index.tsx | 2 ++ core/docz-theme-default/src/components/shared/Search/index.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/docz-theme-default/src/components/shared/Logo/index.tsx b/core/docz-theme-default/src/components/shared/Logo/index.tsx index 11b53407b..56b01890d 100644 --- a/core/docz-theme-default/src/components/shared/Logo/index.tsx +++ b/core/docz-theme-default/src/components/shared/Logo/index.tsx @@ -43,6 +43,8 @@ const Wrapper = styled.div` height: ${p => (p.showBg ? '3px' : 0)}; } } + + ${get('styles.logo')}; ` const LogoImg = styled('img')` diff --git a/core/docz-theme-default/src/components/shared/Search/index.tsx b/core/docz-theme-default/src/components/shared/Search/index.tsx index 0b994a6f1..06596234d 100644 --- a/core/docz-theme-default/src/components/shared/Search/index.tsx +++ b/core/docz-theme-default/src/components/shared/Search/index.tsx @@ -20,7 +20,7 @@ const Wrapper = styled.div` const Icon = styled(SearchIcon)` stroke: ${sidebarText}; - width: 20px; + min-width: 20px; opacity: 0.5; ` From 6dd068cb74f2913e70f9359cb4e30132cf5ed48f Mon Sep 17 00:00:00 2001 From: Ivan Dalmet Date: Tue, 26 Mar 2019 22:08:55 +0100 Subject: [PATCH 5/6] fix(docz-theme-default): apply ignore in props parsing (#723) --- core/docz-core/src/states/props.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/docz-core/src/states/props.ts b/core/docz-core/src/states/props.ts index 04acd20e0..f49b85ec6 100644 --- a/core/docz-core/src/states/props.ts +++ b/core/docz-core/src/states/props.ts @@ -9,12 +9,12 @@ import { Config } from '../config/argv' import { docgen } from '../utils/docgen' const getPattern = (config: Config) => { - const { typescript } = config + const { typescript, ignore } = config return [ typescript ? '**/*.{ts,tsx}' : '**/*.{js,jsx,mjs}', '!**/node_modules', '!**/doczrc.js', - ] + ].concat(ignore.map(entry => `!**/${entry}`)) } export const mapToArray = (map: any = []) => From 3e99db0cdf63a27d434ecf2ba291a7826c7a4c2a Mon Sep 17 00:00:00 2001 From: Elvin Dzhavadov Date: Tue, 26 Mar 2019 15:09:41 -0600 Subject: [PATCH 6/6] fix(docz-core): entries not initialized on build (#725) --- core/docz-core/src/states/entries.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/docz-core/src/states/entries.ts b/core/docz-core/src/states/entries.ts index 5720d7756..7b9c7463a 100644 --- a/core/docz-core/src/states/entries.ts +++ b/core/docz-core/src/states/entries.ts @@ -38,6 +38,7 @@ export const state = (entries: Entries, config: Config): State => { start: async params => { const update = updateEntries(entries) + update(params); watcher.on('add', async () => update(params)) watcher.on('change', async () => update(params)) watcher.on('unlink', async () => update(params))