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] LayerControl read only mode #31318

Merged
merged 6 commits into from
Feb 20, 2019
Merged

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Feb 15, 2019

This PR adds isReadOnly mode to the ui store. When true,

  1. LayerControl does not display Add layer button
  2. TOC layers can not be sorted
  3. layer details panel can not be opened.

The reason for large number of changes is this PR starts to add jest snapshot tests for the LayerControl to verify isReadOnly flag does the above actions.

screen shot 2019-02-15 at 2 05 39 pm

@nreese nreese added [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.2.0 labels Feb 15, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis

@nreese
Copy link
Contributor Author

nreese commented Feb 15, 2019

This is a known issue that is getting addressed in EUI - elastic/eui#1571 and will go away with an EUI upgrade. The PR switches button to EuiLink for the TOCEntry and color text is currently unsupported until the EUI PR is merged.

screen shot 2019-02-15 at 2 10 29 pm

@nreese
Copy link
Contributor Author

nreese commented Feb 15, 2019

To test, just manually edit

and set isReadOnly mode to true

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nreese nreese mentioned this pull request Feb 19, 2019
8 tasks
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.

nice. +1 on just managing this in the store as opposed to getting this setting from some static module function. it will keep it aligned with the other UI-state.

x-pack/plugins/maps/public/store/ui.js Outdated Show resolved Hide resolved
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nreese nreese merged commit 425539e into elastic:master Feb 20, 2019
@nreese
Copy link
Contributor Author

nreese commented Feb 20, 2019

7.x backport blocked by #31550

nreese added a commit to nreese/kibana that referenced this pull request Feb 20, 2019
* hide add layer button in read only mode

* update TOCEntry for read only mode

* make LayerTOC read only

* default isReadOnly to false

* remove action creator until its beig used
nreese added a commit that referenced this pull request Feb 20, 2019
* hide add layer button in read only mode

* update TOCEntry for read only mode

* make LayerTOC read only

* default isReadOnly to false

* remove action creator until its beig used
@alexfrancoeur
Copy link

@nreese if a role has read only access to a space, is this the mode that will now be presented to them?

@alexfrancoeur
Copy link

And if so, would it close this in your opinion? #30313

@nreese
Copy link
Contributor Author

nreese commented Feb 21, 2019

if a role has read only access to a space, is this the mode that will now be presented to them?

yes

And if so, would it close this in your opinion? #30313

Not yet. Lets keep #30313 open until we wire together the user roles and isReadOnly

@alexfrancoeur
Copy link

👍 sounds good, thanks @nreese

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.

4 participants