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

[Maps] add attribution to layer editor #98328

Merged
merged 20 commits into from
May 3, 2021
Merged

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Apr 26, 2021

Closes #32821

Attribution only existed in WMS and TMS sources in the source descriptor. This PR moves attribution from WMS and TMS source descriptor to layer descriptor so that any layer can have attribution.

Attribution can be edited for any layer where source does not provide attribution, like EMS boundaries and EMS basemaps.

Screen Shot 2021-04-26 at 9 54 42 AM

Screen Shot 2021-04-26 at 9 54 54 AM

@nreese nreese added release_note:enhancement [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.14.0 labels Apr 26, 2021
@nreese nreese requested a review from thomasneirynck April 26, 2021 15:57
@nreese nreese requested a review from a team as a code owner April 26, 2021 15:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@nreese nreese requested a review from a team as a code owner April 26, 2021 16:22
@nreese
Copy link
Contributor Author

nreese commented Apr 26, 2021

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented Apr 27, 2021

@elasticmachine merge upstream

Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

Great thx.

Small thing, but is it me or could this row need some design polish?

image

It just looks a little wobbly. Thoughts @miukimiu ?

(maybe can happen in separate PR too)

import { LayerDescriptor } from '../descriptor_types';

// In 7.14, attribution added to the layer_descriptor. Prior to 7.14, 2 sources, WMS and TMS, had attribution on source descriptor.
export function moveAttribution({
Copy link
Contributor

Choose a reason for hiding this comment

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

thx!

@nreese
Copy link
Contributor Author

nreese commented Apr 29, 2021

@elasticmachine merge upstream

@elizabetdev elizabetdev self-requested a review April 30, 2021 11:22
@elizabetdev
Copy link
Contributor

elizabetdev commented Apr 30, 2021

Hi @nreese,

Here's a PR nreese#38 with design and a11y improvements.

A11y changes

  • Used a <fieldset /> to signal that we're going to have a group of related form fields
  • Removed the EuiFormRow because it was not doing anything. And then once the popover was open the label would be focused and it looked like a bug.
  • The title is a legend for that <fieldset />.
  • Added missing aria-label for buttons.

Design

  • The attribution lives inside a panel and the edit and clear buttons are bottom right-aligned so that they seem they control what is inside that panel.
  • Decreased the size of the popover, including the padding. Also, change the text fields to compressed.

attribution-flow-v2@2x

* Design and a11y improvements

* Buttons aria labels

* Addressing PR review
@nreese
Copy link
Contributor Author

nreese commented May 3, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 772 774 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
maps 2.7MB 2.7MB +5.8KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@nreese nreese merged commit 85b7871 into elastic:master May 3, 2021
nreese added a commit to nreese/kibana that referenced this pull request May 3, 2021
* [Maps] add attribution to layer editor

* update sources to getAttributionProvider

* remove attribution UI from EMS_XYZ source

* remove attribution UI from WMS source editor

* clean up

* tslint

* AttributionFormRow jest test

* add migration

* tslint

* i18n fixes

* attribution

* [Maps] Improving design and a11y for attribution layer settings (#38)

* Design and a11y improvements

* Buttons aria labels

* Addressing PR review

* tslint and i18n fixes

* update jest snapshots

* remove placeholder for url

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Elizabet Oliveira <[email protected]>
nreese added a commit that referenced this pull request May 3, 2021
* [Maps] add attribution to layer editor

* update sources to getAttributionProvider

* remove attribution UI from EMS_XYZ source

* remove attribution UI from WMS source editor

* clean up

* tslint

* AttributionFormRow jest test

* add migration

* tslint

* i18n fixes

* attribution

* [Maps] Improving design and a11y for attribution layer settings (#38)

* Design and a11y improvements

* Buttons aria labels

* Addressing PR review

* tslint and i18n fixes

* update jest snapshots

* remove placeholder for url

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Elizabet Oliveira <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Elizabet Oliveira <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps] Cannot put in attribution for all source types
5 participants