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

IW-1022 | global nav #22

Merged
merged 113 commits into from Mar 11, 2019
Merged

IW-1022 | global nav #22

merged 113 commits into from Mar 11, 2019

Conversation

xkxd
Copy link
Contributor

@xkxd xkxd commented Feb 13, 2019

This is the main PR for all the work related to implementing our current Ember-based global navigation in React.

Including:

@xkxd xkxd added the wip Work in progress label Feb 13, 2019
@xkxd xkxd requested a review from vforge as a code owner February 13, 2019 09:42
@vforge
Copy link
Collaborator

vforge commented Feb 13, 2019

Pinging @JoshuaRogan - CAKE is using their own GN now and it will be NICE to kill that too.

Copy link
Collaborator

@vforge vforge left a comment

Choose a reason for hiding this comment

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

Left few comments - I'll add more once I finish detailed CR. Mostly minor stuff.

Few more things:

If you demo GlobalNavigation you need to fix styles of the demo (and probably add a note to README - check FandomContentWell) otherwise this happens:
https://www.dropbox.com/s/x4pbfo3girh6qrg/Screenshot%202019-03-04%2011.58.09.png?dl=0

Also there are errors in the console while running yarn dev:

019-03-04 11:55:41.324|TESTS     console.warn node_modules/react-i18next/dist/commonjs/utils.js:17
2019-03-04 11:55:41.324|TESTS       react-i18next:: You will need pass in an i18next instance by using i18nextReactModule

And Avatar/AvatarStack/BannerNotification (and maybe others) are missing from the styleguide now Fixed

I'll look at this PR/issues later today.

.eslintrc Outdated Show resolved Hide resolved
@@ -51,6 +51,7 @@
"Fieldset",
"FloatingButton",
"FloatingButtonGroup",
"GlobalNavigation",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please move GlobalNavigation to systems/ instead` - It's way more complex than just a component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd argue.

Aside of its size GlobalNav is still a single component with no additional requirements which accepts a bunch of props and does not care about the rest of app, while BannerNotification comes with store injection, actions and a dedicated model.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that is a fair point but GlobalNav is more of an organism whereas components should be molecules/atoms. http://bradfrost.com/blog/post/atomic-web-design/#atoms

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At which moment a 'component' becomes an 'organism'/'system'? It's not clear for me, and could cause some issues with understanding the concept. Eg. if we'd like to move OpenGraph card to common, should it be a 'component' or an 'organism'?

My understanding of the file structure was described above - if you need to export something more than a component itself, it should become a system. But in other case, from dev/react perspective, a component (no matter how big) is still a encapsulated entity that you can use and pass props to.

Maybe to avoid such issues we should rename 'systems' to eg. 'redux' and keep there only related stuff?

source/components/AvatarStack/index.js Outdated Show resolved Hide resolved
source/components/GlobalNavigation/hooks/useLazyLoad.js Outdated Show resolved Hide resolved
@vforge
Copy link
Collaborator

vforge commented Mar 5, 2019

Still waiting on @JoshuaRogan review (as it's probably going to be used to replace custom GlobalNav in FandomCreator)

@xkxd xkxd mentioned this pull request Mar 5, 2019
@@ -76,6 +77,9 @@
"jest/valid-expect": "error",
"react/button-has-type": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/click-events-have-key-events": 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not convinced we should disable all of these. We should try to be accessible as possible at a min in this library. We already do a poor job in most of our apps so it would be good to set the precedent in react-common.

Copy link
Contributor Author

@xkxd xkxd Mar 8, 2019

Choose a reason for hiding this comment

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

In general i agree, but this is a company-wide plan that should be mostly driven by UX and product folks, because it requires some specific keyboard behaviours to be introduced. I'd be glad if such thing would become real, but afaik we had some approaches for it and we failed in execution.

Having that rule for the sake of adding empty onKeyPress listeners to satisfy linter did not make sense, so I've decided to disable it after 5th or 6th eslint disable next line comment.

xkxd added 3 commits March 8, 2019 16:07
# Conflicts:
#	docs/build/1.fe780730.js
#	docs/build/bundle.6126b43e.js
#	docs/index.html
#	package.json
#	source/components/AvatarStack/README.md
#	source/components/AvatarStack/index.js
#	source/components/BannerNotification/index.js
@xkxd xkxd removed the wip Work in progress label Mar 11, 2019
@xkxd xkxd merged commit e2c5e9c into master Mar 11, 2019
@xkxd xkxd deleted the IW-1022 branch March 11, 2019 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants