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

Menu e sidebar #22

Merged
merged 96 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
c6b515e
feat: adds new social media icon
Pvcunha Dec 21, 2023
c2eae70
feat: language switcher component for footer
Pvcunha Dec 21, 2023
8be47be
feat: adds footer messages social media urls and footer components
Pvcunha Dec 21, 2023
956f49d
fix: remove deleted method
Pvcunha Dec 21, 2023
81371b0
fix: changes site map placeholder
Pvcunha Dec 21, 2023
7563117
fix: not clipping language selector
Pvcunha Dec 21, 2023
3285d79
feat: adds hover effect on icons
Pvcunha Jan 2, 2024
0166fde
fix: close language selector after click
Pvcunha Jan 2, 2024
74b131f
refactor: removing test style
Pvcunha Jan 3, 2024
2b35a04
feat: adds info icon
Pvcunha Jan 3, 2024
2113979
feat: adds new icons to sidebar
Pvcunha Jan 3, 2024
488de35
feat: adds new social media icon
Pvcunha Dec 21, 2023
5b703d4
feat: language switcher component for footer
Pvcunha Dec 21, 2023
67e7ee2
feat: adds footer messages social media urls and footer components
Pvcunha Dec 21, 2023
0c1f180
fix: remove deleted method
Pvcunha Dec 21, 2023
9576202
fix: changes site map placeholder
Pvcunha Dec 21, 2023
6136f08
fix: not clipping language selector
Pvcunha Dec 21, 2023
96603f6
feat: adds hover effect on icons
Pvcunha Jan 2, 2024
5721ca6
fix: close language selector after click
Pvcunha Jan 2, 2024
916d13a
refactor: removing test style
Pvcunha Jan 3, 2024
a378cfe
Merge branch 'feat/footer' of github.com:vtexdocs/helpcenter into fea…
Pvcunha Jan 3, 2024
4b2c0a0
feat: adds sections and icons to menu
Pvcunha Jan 8, 2024
beff01a
feat: adds menu documentation section
Pvcunha Jan 8, 2024
93d0c4a
fix: adds translations to icons titles
Pvcunha Jan 9, 2024
d1b503c
Merge pull request #21 from vtexdocs/feat/footer
Pvcunha Jan 9, 2024
f0469f3
feat(getdocspaths): create functions to get all docs
RobsonOlv Oct 20, 2023
5cb549f
feat(announcements): add docs paths, update section selected and cont…
RobsonOlv Oct 20, 2023
8bfcae2
feat(tracks): add docs paths
RobsonOlv Oct 20, 2023
fe7a470
feat(tutorial): update static paths
RobsonOlv Oct 20, 2023
41445ad
refactor(getdocspaths): create getDocs template
RobsonOlv Nov 28, 2023
f49f727
fix(getdocspaths): add getAllDocsPaths function to be called in api/docs
RobsonOlv Nov 29, 2023
1b8bfb3
build: update deploy
RobsonOlv Nov 29, 2023
fc54ff5
fix(getdocs): get documents from raw.github
RobsonOlv Dec 6, 2023
4c14bd0
fix(docs): add doctype to getdocs function
RobsonOlv Dec 15, 2023
7947de5
fix(500 page): component name
RobsonOlv Dec 15, 2023
eed15f8
feat(app): add ErrorBoundary and Suspense overlay to catch rendering …
RobsonOlv Dec 15, 2023
7fa25db
fix(tracs): remove unnecessary log
RobsonOlv Dec 16, 2023
b242068
fix(errorboundary): return 500 on error
RobsonOlv Dec 18, 2023
cdbd3b8
fix(docs): update file contributors request
RobsonOlv Dec 22, 2023
60ef471
fix(getfilecontributors): error handling
RobsonOlv Dec 22, 2023
564f63f
feat(netlify.toml): add @netlify/plugin-nextjs
RobsonOlv Jan 5, 2024
ccfc081
feat: add Incremental Static Regeneration
RobsonOlv Jan 9, 2024
8b97e7a
feat: adds info icon
Pvcunha Jan 3, 2024
b5cfad8
feat: adds new icons to sidebar
Pvcunha Jan 3, 2024
95bedcf
feat: adds sections and icons to menu
Pvcunha Jan 8, 2024
44cce81
feat: adds menu documentation section
Pvcunha Jan 8, 2024
cf0583b
fix: adds translations to icons titles
Pvcunha Jan 9, 2024
f52f491
fix(article-pagination): update type of doc name
RobsonOlv Jan 11, 2024
214238c
feat: locale switcher visible in all breakpoints
Pvcunha Jan 11, 2024
b854fbb
Merge branch 'feat/menu' of github.com:vtexdocs/helpcenter into feat/…
Pvcunha Jan 11, 2024
ea465b9
Merge pull request #18 from vtexdocs/feat/getDocs
RobsonOlv Jan 12, 2024
af03aec
feat: update start here main page messages
aliceoq Dec 22, 2023
d036e09
feat(tracks): add start here image
aliceoq Jan 2, 2024
de20345
feat(tracks): add all content messages
aliceoq Jan 2, 2024
76ec5e0
feat(tracks): update start here main page
aliceoq Jan 2, 2024
aec0ffb
fix: change messages ids
aliceoq Jan 2, 2024
0a69dcd
fix: restore whats-next-card
aliceoq Jan 3, 2024
1892591
feat(messages): add reading time message
aliceoq Jan 5, 2024
d097359
chore(deps): add reading-time
aliceoq Jan 8, 2024
2695f91
feat: add remark plugin to calculate reading time
aliceoq Jan 5, 2024
46b90c7
feat: enumerate navigation documents
aliceoq Jan 10, 2024
3d407e6
feat(start-here): add index to title and breadcrumbs
aliceoq Jan 8, 2024
be0757a
fix(tracks): flatten messages json
aliceoq Jan 10, 2024
e5416a8
feat: check document type for 'track' before enumeration
aliceoq Jan 11, 2024
cf740c5
feat: update tracks documentation types on navigation
aliceoq Jan 11, 2024
dee7bb0
Merge pull request #23 from vtexdocs/feat/start-here
aliceoq Jan 12, 2024
0e754c8
chore(package.json): update components lib version
aliceoq Jan 15, 2024
3088f68
fix: use ceil to round reading time
aliceoq Jan 15, 2024
4dbd1dd
Merge pull request #24 from vtexdocs/chore/update-components-version
aliceoq Jan 15, 2024
c1b45da
fix: moves locale switcher do header end
Pvcunha Jan 15, 2024
68eca78
feat: swap position of hamburguer menu with locale switcher
Pvcunha Jan 15, 2024
891afce
feat: removing text and caret from locale selector for mobile widths
Pvcunha Jan 18, 2024
ebdd5f1
chore: update components dependency
Pvcunha Jan 18, 2024
71c1f8e
fix: removing left border of locale switch
Pvcunha Jan 18, 2024
b8c2333
feat: locale switcher and hamburguer menu container adjustments
Pvcunha Jan 19, 2024
bc7359b
feat: adds feedback to menu
Pvcunha Jan 19, 2024
952c30d
feat: adds click color change to icon globe
Pvcunha Jan 19, 2024
e0bda6f
feat: adds info icon
Pvcunha Jan 3, 2024
00265b8
feat: adds new icons to sidebar
Pvcunha Jan 3, 2024
f0dd811
feat: adds sections and icons to menu
Pvcunha Jan 8, 2024
8e0381d
feat: adds menu documentation section
Pvcunha Jan 8, 2024
f4c6a0c
fix: adds translations to icons titles
Pvcunha Jan 9, 2024
081c2f3
feat: locale switcher visible in all breakpoints
Pvcunha Jan 11, 2024
5ffe457
feat: adds new icons to sidebar
Pvcunha Jan 3, 2024
4a68c71
feat: adds sections and icons to menu
Pvcunha Jan 8, 2024
68542e4
feat: adds menu documentation section
Pvcunha Jan 8, 2024
526415b
fix: adds translations to icons titles
Pvcunha Jan 9, 2024
2e582f8
fix: moves locale switcher do header end
Pvcunha Jan 15, 2024
93d0991
feat: swap position of hamburguer menu with locale switcher
Pvcunha Jan 15, 2024
3ac5c9c
feat: removing text and caret from locale selector for mobile widths
Pvcunha Jan 18, 2024
5cb91cb
fix: removing left border of locale switch
Pvcunha Jan 18, 2024
6d51d5d
feat: locale switcher and hamburguer menu container adjustments
Pvcunha Jan 19, 2024
7efb300
feat: adds feedback to menu
Pvcunha Jan 19, 2024
d405899
feat: adds click color change to icon globe
Pvcunha Jan 19, 2024
56b6408
fix: fixing rebase
Pvcunha Jan 22, 2024
7a97789
Merge branch 'feat/menu' of github.com:vtexdocs/helpcenter into feat/…
Pvcunha Jan 22, 2024
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/probe-image-size": "^7.2.0",
"@types/uuid": "^9.0.0",
"@vtex/brand-ui": "^0.46.1",
"@vtexdocs/components": "https://github.com/vtexdocs/components.git#v1.2.0",
"@vtexdocs/components": "https://github.com/vtexdocs/components.git#v2.0.0",
"algoliasearch": "^4.14.2",
"chalk": "^5.2.0",
"copy-text-to-clipboard": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/documentation-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DocumentationCard = ({
<a onClick={onClick} style={{ width: '100%' }}>
<Box sx={cardContainer(containerType)}>
<Flex sx={titleContainer(containerType)}>
<Icon size={24} />
<Icon size={24} sx={{ color: '#4A596B' }} />
<Text className="title" sx={cardTitle(containerType)}>
{title}
</Text>
Expand Down
20 changes: 18 additions & 2 deletions src/components/dropdown-menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { Box } from '@vtex/brand-ui'

import DocumentationCard from 'components/documentation-card'
import { documentationData, updatesData } from 'utils/constants'
import {
menuDocumentationData,
menuSupportData,
updatesData,
} from 'utils/constants'
import { useIntl } from 'react-intl'

import styles from './styles'
Expand All @@ -15,7 +19,19 @@ const DropdownMenu = () => {
sx={styles.documentationContainer}
data-cy="dropdown-menu-first-section"
>
{documentationData(intl).map((card) => (
{menuDocumentationData(intl).map((card) => (
<DocumentationCard
containerType="dropdown"
key={card.title}
{...card}
/>
))}
</Box>
<Box
sx={styles.updatesContainer}
data-cy="dropdown-menu-second-section"
>
{menuSupportData(intl).map((card) => (
<DocumentationCard
containerType="dropdown"
key={card.title}
Expand Down
78 changes: 62 additions & 16 deletions src/components/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
import { Box, FooterLanding } from '@vtex/brand-ui'
import { Box, Flex, Link } from '@vtex/brand-ui'
import styles from './styles'
import {
getDeveloperPortalURL,
getHelpCenterURL,
getGithubURL,
getCommunityURL,
getFeedbackURL,
getSiteMapURL,
getFacebookURL,
getInstagramURL,
getYoutubeURL,
getLinkedinURL,
getTwitterURL,
} from 'utils/get-url'
import { useIntl } from 'react-intl'
import FacebookIcon from 'components/icons/facebook-icon'
import LocaleSwitcherFooter from 'components/locale-switcher-footer'
import VtexLogoFooter from 'components/icons/vtexLogoFooter'
import InstagramIcon from 'components/icons/instagram-icon'
import LinkedinIcon from 'components/icons/linkedin-icon'
import YoutubeIcon from 'components/icons/youtube-icon'
import TwitterIcon from 'components/icons/twitter-icon'

const Footer = () => {
const intl = useIntl()

const links = [
{
message: intl.formatMessage({
id: 'landing_page_footer_developer_portal.message',
id: 'landing_page_footer_github.message',
}),
to: () => getDeveloperPortalURL(),
to: () => getGithubURL(),
},
{
message: intl.formatMessage({
id: 'landing_page_footer_help_center.message',
id: 'landing_page_footer_developer_portal.message',
}),
to: () => getHelpCenterURL(),
to: () => getDeveloperPortalURL(),
},
{
message: intl.formatMessage({
Expand All @@ -36,21 +49,54 @@ const Footer = () => {
}),
to: () => getFeedbackURL(),
},
{
message: intl.formatMessage({
id: 'landing_page_footer_site_map.message',
}),
to: () => getSiteMapURL(),
},
]

const socialIcons = [
{
to: () => getFacebookURL(),
component: <FacebookIcon sx={styles.icon} />,
},
{
to: () => getInstagramURL(),
component: <InstagramIcon sx={styles.icon} />,
},
{
to: () => getYoutubeURL(),
component: <YoutubeIcon sx={styles.icon} />,
},
{
to: () => getLinkedinURL(),
component: <LinkedinIcon sx={styles.icon} />,
},
{
to: () => getTwitterURL(),
component: <TwitterIcon sx={styles.icon} />,
},
]
return (
<Box sx={styles.footerLinks}>
<FooterLanding>
<Box sx={styles.outerBox}>
<VtexLogoFooter sx={{ width: '61px', height: '22px' }} />
<Flex sx={styles.socialMediaIcons}>
{socialIcons.map((icon, index) => (
<Link key={index} href={icon.to()}>
{icon.component}
</Link>
))}
</Flex>
<Flex sx={styles.textLinkItems}>
{links.map((link, index) => (
<FooterLanding.Link
key={index}
href={link.to()}
target="_blank"
sx={index % 2 ? styles.footerRightLinks : styles.footerLeftLinks}
>
<Link sx={{ color: '#CCCED8' }} key={index} href={link.to()}>
{link.message}
</FooterLanding.Link>
</Link>
))}
</FooterLanding>
<LocaleSwitcherFooter sx={styles.localeSwitchLanding} />
</Flex>
</Box>
)
}
Expand Down
68 changes: 42 additions & 26 deletions src/components/footer/styles.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,53 @@
import { SxStyleProp } from '@vtex/brand-ui'

const footerLeftLinks: SxStyleProp = {
ml: ['0px', '32px'],
mb: ['24px', '0px'],
textAlign: 'left',
const outerBox: SxStyleProp = {
bg: '#142032;',
display: ['flex'],
flexDirection: ['column', 'row'],
padding: '48px 32px 48px 48px',
alignItems: ['flex-start', 'center'],
justifyContent: 'space-between',
flexWrap: 'wrap',
rowGap: '32px',
overflow: ['initial'],
}

const footerRightLinks: SxStyleProp = {
...footerLeftLinks,
textAlign: 'right',
const socialMediaIcons: SxStyleProp = {
gap: '16px',
alignItems: 'center',
paddingTop: '5px',
}

const footerLinks: SxStyleProp = {
'& > footer': {
px: ['0px', '32px'],
'& > div': {
flexDirection: ['column', 'row'],
alignItems: ['flex-start', 'center'],
px: ['32px', '0px'],
py: ['32px'],
width: ['100vw', '100%'],
'& > :last-child': {
mt: ['32px', '0px'],
display: ['grid', 'flex'],
justifyItems: ['stretch', 'initial'],
justifyContent: ['space-between', 'flex-end'],
},
},
const textLinkItems: SxStyleProp = {
fontSize: '16px',
gap: ['48px', '30px', '45px'],
rowGap: ['45px'],
flexWrap: 'wrap',
justifyItems: 'left',
alignItems: 'center',
}

const localeSwitchLanding: SxStyleProp = {
marginLeft: '0',
justifySelf: 'left',
positionBottom: '5px',
}

const icon: SxStyleProp = {
size: 32,
color: '#CCCED7',
transition: 'all 0.3s ease-out',
borderRadius: '50%',
':hover': {
color: 'white',
backgroundColor: 'rgba(204, 206, 215, 0.3)',
},
}

export default {
footerLinks,
footerLeftLinks,
footerRightLinks,
localeSwitchLanding,
outerBox,
socialMediaIcons,
textLinkItems,
icon,
}
11 changes: 9 additions & 2 deletions src/components/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ const Header = () => {
<Flex sx={styles.dropdownButton(showDropdown)}>
<GridIcon />
<Text sx={styles.rightButtonsText} data-cy="docs-dropdown">
{' '}
{/*TODO: mudar data-cy no teste */}
<FormattedMessage id="landing_page_header_docs.message" />
</Text>
</Flex>
Expand All @@ -149,9 +151,14 @@ const Header = () => {
<FormattedMessage id="landing_page_header_feedback.message" />
</Text>
</VtexLink>
<LocaleSwitcher />
<Flex sx={styles.containerHamburguerLocale}>
<HamburgerMenu />
<Box sx={styles.splitter}></Box>
<Box sx={styles.localeSwitcherContainer}>
<LocaleSwitcher />
</Box>
</Flex>
</HeaderBrand.RightLinks>
<HamburgerMenu />
</HeaderBrand>
</Box>
)
Expand Down
61 changes: 59 additions & 2 deletions src/components/header/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,21 @@ const logoSize: SxStyleProp = {
}

const rightLinks: SxStyleProp = {
display: ['none', 'none', 'none', 'flex !important'],
width: 'auto',
display: ['flex !important'],
width: '100%',
height: '100%',
textTransform: 'none',
alignItems: 'center',
}

const rightLinksItem: SxStyleProp = {
display: [
'none !important',
'none !important',
'none !important',
'flex !important',
],
visibility: 'visible',
alignItems: 'center',
padding: '0 !important',
margin: '0 0 0 32px !important',
Expand All @@ -73,6 +82,12 @@ const rightLinksItem: SxStyleProp = {
}

const dropdownContainer: SxStyleProp = {
display: [
'none !important',
'none !important',
'none !important',
'flex !important',
],
textTransform: 'none',
justifyContent: 'flex-end',
height: 'calc(100% + 1px)',
Expand Down Expand Up @@ -159,8 +174,49 @@ const arrowIconActive: SxStyleProp = {
color: '#D71D55',
}

const localeSwitcherContainer: SxStyleProp = {
display: 'flex',
visibility: 'visible',
ml: [0, 0, 0, 0, 0],
pr: ['0px', 0],
zIndex: 1,
justifyContent: 'center',
' & button': {
borderLeft: 'none !important',
padding: '0px',
},
}

const containerHamburguerLocale: SxStyleProp = {
display: 'flex',
padding: '8px',
alignItems: 'center',
height: '100%',
borderLeft: ['none', 'none', 'none', '1px solid #e7e9ed'],
marginLeft: ['0', '0', '0', '32px'],
gap: '20px',

'& > :first-of-type': {
'& > button:first-of-type': {
borderLeft: 'none',
padding: '0px 0px 0px 0px',
width: '24px',
height: '24px',
},
},
}

const splitter: SxStyleProp = {
display: ['block', 'block', 'block', 'none'],
width: '1px',
height: '36px',
background: '#E7E9EE',
}

export default {
splitter,
menuContainer,
containerHamburguerLocale,
cardContainer,
sideMenuContainer,
logoSize,
Expand All @@ -181,4 +237,5 @@ export default {
innerCardContainer,
arrowIcon,
arrowIconActive,
localeSwitcherContainer,
}
34 changes: 34 additions & 0 deletions src/components/icons/facebook-icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { IconProps } from '@vtex/brand-ui'
import { Icon } from '@vtex/brand-ui'

const FacebookIcon = (props: IconProps) => (
<Icon
{...props}
viewBox="0 0 33 33"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M31.5501 16.8379C31.5501 25.3976 24.6 32.3379 16.025 32.3379C7.45006 32.3379 0.5 25.3976 0.5 16.8379C0.5 8.27821 7.45006 1.33789 16.025 1.33789C24.6 1.33789 31.5501 8.27821 31.5501 16.8379Z"
stroke="#4D596A"
/>
<g clipPath="url(#clip0_311_37415)">
<path
d="M17.5268 17.9629H19.4047L20.1559 14.9629H17.5268V13.4629C17.5268 12.6904 17.5268 11.9629 19.0291 11.9629H20.1559V9.44289C19.911 9.41064 18.9863 9.33789 18.0098 9.33789C15.9703 9.33789 14.5221 10.5806 14.5221 12.8629V14.9629H12.2686V17.9629H14.5221V24.3379H17.5268V17.9629Z"
fill="#CCCED7"
/>
</g>
<defs>
<clipPath id="clip0_311_37415">
<rect
width="18.0282"
height="18"
fill="white"
transform="translate(7.01074 7.83789)"
/>
</clipPath>
</defs>
</Icon>
)

export default FacebookIcon
Loading