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

[UI Framework] Add several kuiLocalNav-related components #11725

Merged

Conversation

weltenwort
Copy link
Member

@weltenwort weltenwort commented May 11, 2017

This adds several LocalNav-related React components I need for the context view:

  • KuiLocalNav
  • KuiLocalNavRow
  • KuiLocalNavRowSection
  • KuiLocalNavTab
  • KuiLocalNavTabs
  • KuiLocalNavTitle

Could be seen as a step towards #10312.

@weltenwort weltenwort self-assigned this May 11, 2017
className: PropTypes.string,
children: PropTypes.node,
isSelected: PropTypes.bool,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

missing isDisabled here and below

@stacey-gammon
Copy link
Contributor

Can you update the ui_framework/doc_site/src/views/local_nav to use the new react components?

@cjcenizal
Copy link
Contributor

Holy carp, this will go a long way towards pushing #9758 forward as well! I'll hold off on review until you've updated the doc site with these components per @stacey-gammon's comment.

@weltenwort
Copy link
Member Author

weltenwort commented May 11, 2017

@cjcenizal I totally forgot about that PR - not sure how we would reconcile the two. As much as I'd love to see the page header be replaced with react on other pages than the context view, it would be quite the effort. There are usually many angular components embedded in the menu and dropdown which would have to be rewritten to react too. Unless we want to allow "angular directives in react components in angular directives"... 🤔

@cjcenizal
Copy link
Contributor

@weltenwort Good point. I doubt I'll have bandwidth to return to that PR for a couple months. By then you'll have used these components in Context View. Maybe that will expose some patterns I can apply to the Angular code, too.

@cjcenizal cjcenizal changed the title Add several kuiLocalNav-related components [UI Framework] Add several kuiLocalNav-related components May 11, 2017
@cjcenizal
Copy link
Contributor

BTW, we have an unspoken convention of prefixing the titles of UI Framework PRs with [UI Framework] to make it easier to ignore them when people write release notes.

@cjcenizal
Copy link
Contributor

@weltenwort When you add examples, could you rebase master and then go into doc_site/src/services/routes/routes.js and update the components array definition with:

}, {
  name: 'LocalNav',
  component: LocalNavExample,
  hasReact: true,
}, {

I just added this feature. By adding hasReact: true, you'll tell the navigation to display a little React logo next to the LocalNav item in the site navigation. This way we can scan and quickly differentiate React components from non-React components.

@weltenwort weltenwort force-pushed the enhancement/kui-components-local-nav branch from 426a0bc to d882c1d Compare May 16, 2017 17:57
@weltenwort weltenwort force-pushed the enhancement/kui-components-local-nav branch from d882c1d to 6f28f1a Compare May 17, 2017 11:13
@weltenwort
Copy link
Member Author

I converted all examples for which any components exist to React, even if not all elements have corresponding components yet. This means the examples can be easily updated when the remaining components are converted.

@stacey-gammon @cjcenizal it should be worth another look, I hope

KuiLocalNavRowSection,
} from '../../../../components';

export default () => (
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make all of these named exports?

Copy link
Member Author

Choose a reason for hiding this comment

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

right, that got carried over from the prior art 😉

@stacey-gammon
Copy link
Contributor

Failed due to #11499

jenkins, test this

Copy link
Contributor

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

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

Aside from switching to named exports, LGTM!

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

LGTM! 🌻

@weltenwort weltenwort merged commit 8a765a3 into elastic:master May 18, 2017
weltenwort added a commit to weltenwort/kibana that referenced this pull request May 18, 2017
Backports PR elastic#11725

This adds several `LocalNav`-related React components and converts their usage in the docs to React:

* `KuiLocalNav`
* `KuiLocalNavRow`
* `KuiLocalNavRowSection`
* `KuiLocalNavTab`
* `KuiLocalNavTabs`
* `KuiLocalNavTitle`
weltenwort added a commit that referenced this pull request May 18, 2017
Backports PR #11725

This adds several `LocalNav`-related React components and converts their usage in the docs to React:

* `KuiLocalNav`
* `KuiLocalNavRow`
* `KuiLocalNavRowSection`
* `KuiLocalNavTab`
* `KuiLocalNavTabs`
* `KuiLocalNavTitle`
snide pushed a commit to snide/kibana that referenced this pull request May 30, 2017
)

This adds several `LocalNav`-related React components and converts their usage in the docs to React:

* `KuiLocalNav`
* `KuiLocalNavRow`
* `KuiLocalNavRowSection`
* `KuiLocalNavTab`
* `KuiLocalNavTabs`
* `KuiLocalNavTitle`
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.

None yet

3 participants