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

Create "chromeConfigControls" for plugins to add chrome config sections #6151

Closed
wants to merge 9 commits into from
Closed

Create "chromeConfigControls" for plugins to add chrome config sections #6151

wants to merge 9 commits into from

Conversation

trevan
Copy link
Contributor

@trevan trevan commented Feb 8, 2016

The timepicker config and navrbar section has been moved over to this registry so you can get an idea of what it would look like. I also removed the chorome/context.js since that is now inside of timepicker/toggle.js.

I did not convert the app switcher since that appears to be going away in the redesign.

I have not yet added unittests for the new "kbnChromeConfigControls" directive but all the other tests should pass.

This closes #6136

Each chromeConfigControl has a navbar component and a config component.
@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@epixa
Copy link
Contributor

epixa commented Feb 8, 2016

This needs to be rebased on master or have master merged into it.

…me-ui

Conflicts:
	src/ui/public/chrome/context.js
@trevan
Copy link
Contributor Author

trevan commented Feb 8, 2016

I merged master into it.

@epixa
Copy link
Contributor

epixa commented Feb 8, 2016

jenkins, test it

@spalger spalger self-assigned this Feb 10, 2016
@@ -56,6 +56,8 @@
<!-- /Full navbar -->
</nav>

<div kbn-chrome-config-controls>
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: can we just make this a custom element, <kbn-chrome-config-controls>

@spalger
Copy link
Contributor

spalger commented Feb 10, 2016

This is looking great @trevan

Trevan Richins added 2 commits February 10, 2016 13:37
Change kbn-chrome-config-controls to an element
Import the config section html instead of require
@trevan
Copy link
Contributor Author

trevan commented Feb 10, 2016

@spalger, I updated per your comments. I also added tests for the new directive. And I modified the append nav directive to merge the items from the nav registry and the config registry so you can control their order.

@epixa
Copy link
Contributor

epixa commented Feb 10, 2016

jenkins, test it

@spalger
Copy link
Contributor

spalger commented Feb 12, 2016

This LGTM. Opened #6224 which merged this with master. This is ready for another set of eyes. Working on tracking down a candidate.

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@trevan
Copy link
Contributor Author

trevan commented Feb 25, 2016

@spalger, I noticed that the autorefresh functionality was broken with these changes so I've merged in master and fixed the issue.

@epixa
Copy link
Contributor

epixa commented Feb 25, 2016

jenkins, test it

}),

...configs.map(function (config) {
const configHtml = `<render-directive definition="configs['${config.name}'].navbar">
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure how I missed this the first time, but we should probably take a tad-bit more care with how we build configHtml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, I guess we have to trust the template value, but I would feel better if we changed the injection of config.name to something like:

`<render-directive definition="configs.byName['${JSON.stringify(config.name)}'].navbar">

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The JSON.stringify didn't work since it add double quotes which messed up the html parsing. I instead add a regex piece in the registry that forces the names to only allow a-z, A-Z, or 0-9.

@spalger
Copy link
Contributor

spalger commented Mar 8, 2016

Awesome, thanks for the updates @trevan!

@spalger spalger assigned lukasolson and unassigned spalger Mar 8, 2016
@spalger
Copy link
Contributor

spalger commented Mar 8, 2016

Assigned to @lukasolson to get a second set of eyes on the changes

@lukasolson
Copy link
Member

Looks like we need master merged again... :)

@trevan
Copy link
Contributor Author

trevan commented Mar 16, 2016

@lukasolson, I merged master

@spalger
Copy link
Contributor

spalger commented Mar 16, 2016

Alright, so with the updated coming in feature/redesign I think we need to put this on hold momentarily. Sorry @trevan.

Once we get feature/design merged we can find a way to get this into there. It shouldn't be too hard, but since the chrome is now on the left of the screen and the taskbar is implemented by each application, rather than injected by the chrome, we will need to think about how to implement this there.

@spalger spalger added blocked and removed review labels Mar 16, 2016
@lukasolson lukasolson removed their assignment Mar 16, 2016
@trevan
Copy link
Contributor Author

trevan commented Mar 16, 2016

@spalger, ok. I still have a use for a control next to the timepicker and I don't want it to just be a static string either.

@panda01
Copy link
Contributor

panda01 commented May 11, 2016

This is no longer blocked, though maybe you were able to achieve what you wanted without this, either way @trevan, would you like to continue this?

@panda01
Copy link
Contributor

panda01 commented Jun 10, 2016

@trevan i understand you're busy, but due to a lack of feedback, I'm going to close this PR. If you would like to submit another one under the same branch it is always welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow plugins to add config sections to the chrome ui
6 participants