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

[Vis: Default editor] EUIficate coordinate map (tile map) options tab #42517

Merged
merged 18 commits into from
Aug 6, 2019

Conversation

sulemanof
Copy link
Contributor

@sulemanof sulemanof commented Aug 2, 2019

Summary

A part of #38273.
EUIfication of the Options tab in the Coordinate map vis.

This includes:

  • created a common RangeOption component;
  • created a common TextInputOption component;
  • created withInjectedDependencies as HOC to pass dependencies from angular injector as serviceSettings to Options;
  • created WmsOptions and WmsInternalOptions components;
  • removed vislibBasicOptions directive;

TILE_MAP

TILE_MAP

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@sulemanof sulemanof requested a review from a team as a code owner August 2, 2019 12:38
@sulemanof sulemanof added Feature:Vis Editor Visualization editor issues release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.4.0 v8.0.0 labels Aug 2, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@elasticmachine
Copy link
Contributor

💔 Build Failed

@timroes timroes mentioned this pull request Aug 2, 2019
10 tasks
@sulemanof sulemanof force-pushed the EUIfication/options/tile_map branch from 6c25782 to c6e6336 Compare August 2, 2019 15:06
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

<EuiSpacer size="s" />

<TextInputOption
label={<FormattedMessage id="tileMap.wmsOptions.wmsUrlLabel" defaultMessage="WMS url*" />}
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to try to make these "footnotes" accessible. I'm thinking that you'll want to do some form of:

<label>WMS url <sup aria-describedby="wmsInternalOptionsFootnote">*</sup></label>

<p id="wmsInternalOptionsFootnote">*If this parameter is incorrect, maps will fail to load.</p>

Or maybe @myasonik has some ideas as well.

Copy link
Contributor

@myasonik myasonik Aug 5, 2019

Choose a reason for hiding this comment

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

aria-label, aria-labelledby and aria-describedby generally don't work on non-interactive and/or non-widget role elements.

I tested adding role=tooltip to various elements but that's not well supported... (though that's probably the answer I wish I could give)

So I think the best recommendation I can give is to add this text to the help text of the inputs so it's read as part of the description of the input.

To clean up the reading, I'd also hide the asterisk and the final footnote from screen readers with aria-hidden=true.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just a small note to add, also just noticed that we could pass in describedByIds which would similarly work to add more description text to the input but, after testing it with Daniil, we decided against it.

Using describedByIds puts the repeated footnote first and the unique help text second but a user is likely to navigate away from the input before it's done reading if it sounds like we're reading the same text over and over again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @myasonik for your help!
The PR updated with suggested changes

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@maryia-lapata maryia-lapata left a comment

Choose a reason for hiding this comment

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

Code LGTM, but please resolve comments below.

export interface InjectedDependencies {
[key: string]: any;
}
export interface VisOptionsProps extends InjectedDependencies {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't extend VisOptionsProps itself because it will influence other components (Pie, Tag cloud) allowing to pass almost any addition props. Instead of this let's create a separate interface for tile and region maps (e.g. VisMapOptionsProps) which will extend VisOptionsProps interface and have serviceSettings property additionally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch! Done!

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

LGTM, with just one extra suggestion.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@sulemanof sulemanof merged commit 8eb99b4 into elastic:master Aug 6, 2019
@sulemanof sulemanof deleted the EUIfication/options/tile_map branch August 6, 2019 09:00
sulemanof added a commit to sulemanof/kibana that referenced this pull request Aug 6, 2019
…elastic#42517)

* EUIficate tile_map_vis_options

* Add basic options

* Get rid of vislib_basic_options

* Move wms_options directive to region_map

* Get rid if TileMapVisParams directive

* Update region_map namespaces

* Support of injecting of any dependency
sulemanof added a commit that referenced this pull request Aug 7, 2019
…#42517) (#42671)

* EUIficate tile_map_vis_options

* Add basic options

* Get rid of vislib_basic_options

* Move wms_options directive to region_map

* Get rid if TileMapVisParams directive

* Update region_map namespaces

* Support of injecting of any dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Vis Editor Visualization editor issues release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.4.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants