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

chore(rebuild): finish navigation refactoring #2048

Merged
merged 5 commits into from
Apr 17, 2018
Merged

Conversation

skipjack
Copy link
Collaborator

Re-integrate icon links and searching in the navigation bar. Use the next version of react-banner which supports more generic banner items.

For those who don't know, react-banner is an abstraction of our Navigation component that I built a while ago but couldn't integrate due to build process limitations. Using this package significantly simplifies how much we have to manage within this repository.

...links,
{
title: 'GitHub Repository',
url: '//github.com/webpack/webpack',
Copy link
Member

Choose a reason for hiding this comment

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

this will always result in https as gh pages forcing https, maybe type https explicitly here too like for the other urls below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do, I think this was an artifact from a while back.

Copy link
Member

@EugeneHlushko EugeneHlushko left a comment

Choose a reason for hiding this comment

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

just a small thought on readability and sense of // links, otherwise LGTM

{ title: 'Blog', url: '//medium.com/webpack' }
{ content: 'Contribute', url: '/contribute' },
{ content: 'Vote', url: '/vote' },
{ content: 'Blog', url: '//medium.com/webpack' }
Copy link
Member

Choose a reason for hiding this comment

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

here too

@@ -62,16 +62,16 @@ class Site extends React.Component {
toggleSidebar={ this._toggleSidebar }
links={[
{
title: 'Documentation',
content: 'Documentation',
url: '/concepts',
Copy link
Member

@montogeek montogeek Apr 14, 2018

Choose a reason for hiding this comment

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

We need to rethink how URLs are formed, when trying to build the site to work under a path I had to do a lot of changes (https://github.com/webpack/webpack.js.org/tree/fix/v3-docs), we need to work on it now in order to be able to support multiple versions in the future

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's definitely something we need to tackle at some point, but is that something that needs to happen before rebuild is merged? Will these routes conflict with the /v3 route you created?

Personally I think figure out version management as a follow up after finishing rebuild (though I understand we did need to get something up quickly before for v3 when deploying v4).

Copy link
Member

Choose a reason for hiding this comment

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

this is indeed a pain point for community, though lets try to keep it to the plan and get rebuild into master asap before diving into much detail on doc versioning

Copy link
Member

Choose a reason for hiding this comment

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

No, after merging rebuild is fine, would be better to do it before so we can launch new website with multiple versions support, that would make headlines! (jk).

I have tried to push that change, without success #1992 :/

@skipjack skipjack changed the title Rebuild Navigation chore(rebuild): finish navigation refactoring Apr 15, 2018
@skipjack skipjack mentioned this pull request Apr 15, 2018
16 tasks
Ideally we should still move away from the icon font but this fixes some issues with
the font's vertical metrics due to different svg sizing.
…on links

The `next` version of `react-banner` supports more generic `items` rather than focusing
solely on `links` which customizations like icons and dropdowns much easier to handle.
@skipjack skipjack force-pushed the rebuild-navigation branch from 3dc27e9 to d9fc15b Compare April 15, 2018 03:39
@Munter
Copy link
Collaborator

Munter commented Apr 15, 2018

I can help out finding any links that are of the wrong form with assetgraph. There's a bit of extra work bridging the Gap back to the markdown file, but I'm sure we can script that

import DocSearch from 'docsearch.js';

// Import Utilities/Images
import GitHubIcon from '../../styles/icons/github.svg';
Copy link
Member

Choose a reason for hiding this comment

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

Is this dependency used? I can't spot it. I'm seeing we are using the class for the icon font instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, I’ll remove it. Played around with it momentarily and the fixed font metrics instead.

@skipjack skipjack merged commit 54e7e6b into rebuild Apr 17, 2018
@skipjack skipjack deleted the rebuild-navigation branch April 17, 2018 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants