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

feat(tabs): add tabs component - INNO-617 #201

Merged
merged 24 commits into from
Jun 20, 2017
Merged

feat(tabs): add tabs component - INNO-617 #201

merged 24 commits into from
Jun 20, 2017

Conversation

yhuard
Copy link
Contributor

@yhuard yhuard commented Jun 20, 2017

TODO:

  • add tests

emeryro and others added 20 commits June 12, 2017 15:35
# Conflicts:
#	test/screenshots/reference/navigation/lists/default/OS X 10.11_Safari_v9.png
#	test/screenshots/reference/navigation/lists/default/Windows 10_Chrome_v56.png
#	test/screenshots/reference/navigation/lists/default/Windows 7_Firefox_v46.png
#	test/screenshots/reference/navigation/lists/default/Windows 7_IE_v11.png
#	test/screenshots/reference/navigation/lists/tabs/OS X 10.11_Safari_v9.png
#	test/screenshots/reference/navigation/lists/tabs/Windows 10_Chrome_v56.png
#	test/screenshots/reference/navigation/lists/tabs/Windows 7_Firefox_v46.png
#	test/screenshots/reference/navigation/lists/tabs/Windows 7_IE_v11.png
#	test/screenshots/reference/navigation/menus/OS X 10.11_Safari_v9.png
#	test/screenshots/reference/navigation/menus/Windows 10_Chrome_v56.png
#	test/screenshots/reference/navigation/menus/Windows 7_Firefox_v46.png
#	test/screenshots/reference/navigation/menus/Windows 7_IE_v11.png
@kalinchernev kalinchernev self-assigned this Jun 20, 2017
@@ -0,0 +1,24 @@
{
"name": "@ec-europa/ecl-navigation-lists",
Copy link
Contributor

Choose a reason for hiding this comment

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

tabs, small thing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How did I miss that? 😄 Thanks!

Copy link
Contributor

@kalinchernev kalinchernev left a comment

Choose a reason for hiding this comment

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

I don't see any issues, only really minor comments

"main": "_ecl-tabs.scss",
"style": "_ecl-tabs.scss",
"peerDependencies": {
"@ec-europa/ecl-links": "^0.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

The version of is 0.5.0 at the moment, could be a bit higher

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 some point, we will have to rethink the way we handle the dependencies between the packages. Right now, we only use peerDependencies which are more informational / not strict enough. I guess that we will need to switch to dependencies, but it will also slow the bootstrap phase since lerna will have to link all the dependencies between them correctly...

// Heavily inspired by the tab component from https://github.com/frend/frend.co

// Query helper
const q = (el, ctx = document) => [].slice.call(ctx.querySelectorAll(el));
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add it a bit more globally so all components can benefit?

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've also thought about it. Making a small set of utilities provided with ecl-base. Will do it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in ecl-base/helpers/dom.js

@@ -0,0 +1,20 @@
<div class="ecl-tabs">
Copy link
Contributor

Choose a reason for hiding this comment

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

A question here. When the D8 (potentially) uses the templates from our packages, is it that they can use it better if we provide the information in the templates via context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely. The template has to be rewritten to introduce some logic into it. So does a couple of other components. We can discuss that tomorrow :)

@@ -0,0 +1,5 @@
// Query helper
export const queryAll = (selector, context = document) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for this!

@yhuard yhuard merged commit 24e436b into master Jun 20, 2017
@yhuard yhuard deleted the feat/tabs branch June 20, 2017 18: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.

3 participants