[Lens] Enable read only editor mode to inspect panel's configuration#208554
[Lens] Enable read only editor mode to inspect panel's configuration#208554dej611 merged 52 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
| public getDisplayName({ embeddable }: EmbeddableApiContext) { | ||
| if (!isApiCompatible(embeddable)) throw new IncompatibleActionError(); | ||
| return i18n.translate('presentationPanel.action.showConfigPanel.displayName', { | ||
| defaultMessage: 'Configuration', |
There was a problem hiding this comment.
I've been discussing offline with @MichaelMarcialis about naming here, and there's this idea to change the Edit action label too into something on the line with this:
Configuration=> showConfigure=> edit
WDYT @elastic/kibana-presentation ?
There was a problem hiding this comment.
I think that works pretty well! @wajihaparvez FYI.
There was a problem hiding this comment.
Good for me, can we also change the Edit Lens to this Configure name?
There was a problem hiding this comment.
That's the proposal @markov00 . I'll create a follow up PR for that so we could discuss it more clearly.
There was a problem hiding this comment.
Just jumping in on this. I think these labels are a good idea, but is it possible to say View configuration for "show" instead of just Configuration?
nreese
left a comment
There was a problem hiding this comment.
I am not sure a new action and interfaces are needed. Instead of having separate actions for edit and view - how about just a single action for viewing panel configuration. Then, the panel configuration view can either show a read-only mode or edit mode based on container view mode and user permissions.
That was my initial idea too, and partially this can be found also in the Lens embeddable code, but after tweaking too many things around the edit action, I've decided a distinct action was a better approach. |
|
@nreese in regards to multiple actions vs one action, I was thinking we would consolidate those later as part of our inline editing project - i.e. when we merge panel settings and this editor. |
|
Put on hold for the moment to discuss a bit the edit behaviour for author users. |
|
Quick recap from today's sync with @dej611, @ThomThomson, @ghudgins: Read-only users
Read/write users
|
| } | ||
|
|
||
| /** | ||
| * The execute method contains a compatibility check with a wider scope |
There was a problem hiding this comment.
This comment can be removed since its no longer valid
nreese
left a comment
There was a problem hiding this comment.
kibana-presentation changes LGTM
code review only
…ctions/show_config_panel_action/show_config_panel_action.ts
markov00
left a comment
There was a problem hiding this comment.
Code and functionality are fine for me! LGTM
| <h5> | ||
| {i18n.translate('xpack.lens.config.visualizationConfigurationLabel', { | ||
| defaultMessage: 'Visualization configuration', | ||
| defaultMessage: 'Visualization layers', |
There was a problem hiding this comment.
I don't agree much on this change, this works fine with cartesian charts, but doesn't have much sense for all the other charts that only have a single layer
There was a problem hiding this comment.
No strong opinion here. I can see as a flexible wording for a plugin-first interface, which could potentially can hit any chart type (i.e. annotations for pie charts?). But pragmatically I see your point.
The change was triggered initially by Michael comment here: https://github.com/elastic/kibana/pull/208554/files/34ff73b5fdab54a0e798ddbdd09203b7e9401ee8#r1939693883 . I'll be fine with anything @gvnmagni or @wajihaparvez agree.
There was a problem hiding this comment.
I would personally go with the most agnostic word here so that we avoid incongruences with different kind of charts. If we want to simplify a bit, even just "Configuration" would work
There was a problem hiding this comment.
@markov00 made me notice that we have a Configuration title above that makes this redundant. What if we use "Visualisation Parameters"? I am afraid we need you here @wajihaparvez I am honestly struggling with words :)
There was a problem hiding this comment.
Thanks for looping me in!
I agree with @gvnmagni that we should use something with a broader meaning so that it applies to all visualizations. I really like "Visualization parameters". We could also consider "Visualization settings".
Just a note that whichever phrase we end up using, it should be in sentence case so only the first word should be capitalized, e.g. "Visualization parameters"
There was a problem hiding this comment.
I'll address it with Visualization parameters for now.
…dit_on_the_fly/lens_configuration_flyout.tsx
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
|
…lastic#208554) ## Summary Fixes elastic#106553 This PR enables the Read Only editor feature for Lens panels, who will let users in read mode (no matter broader permissions) to explore the visualization configuration. Short list of changes: * Edit action tooltip now changed from `Edit {name}` into `Edit {name} configuration` * `isEditingEnabled` takes into account now also `Managed` state of both visualization and `parentApi` * A new `showConfigAction` has been created to show users without write capabilities the current Lens chart configuration * Edit inline flyout title changed to `Configuration` no matter the context (this has impact also on creation, i.e. ES|QL new panel) * Within the configuration panel the `Visualization configuration` section title has changed to `Visualization layers` * When the panel is in read-only mode a callout is shown and no editing/saving action is shown ## UX guidance Here's some guidance [inherited by @MichaelMarcialis comment](elastic#208554 (comment)) about the different flows based on user permissions. **Read/write UX** * No change **Read-only UX** * The glasses icon's tooltip shows as "View visualization configuration"? * Flyout title should simply be "Configuration" * On second read, "Read only panel changes will revert after closing" sounds a bit odd. Can we change to "Read-only: Changes will be reverted on close"? Also, can we change the callout icon to glasses? * Change "Visualization configuration" accordion title to "Visualization layers". ### Screenshots **Read-only UX** If user has no write permissions the `glasses` icon is shown for the action:  And the panel is shown with the `read only` callout with no edit buttons:  For a `Managed` dashboard the behaviour is the same as above (for the user there's no difference between regular or managed dashboard, just wanted to report here both cases):   ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com> Co-authored-by: Michael Marcialis <michael.l.marcialis@gmail.com>
…lastic#208554) ## Summary Fixes elastic#106553 This PR enables the Read Only editor feature for Lens panels, who will let users in read mode (no matter broader permissions) to explore the visualization configuration. Short list of changes: * Edit action tooltip now changed from `Edit {name}` into `Edit {name} configuration` * `isEditingEnabled` takes into account now also `Managed` state of both visualization and `parentApi` * A new `showConfigAction` has been created to show users without write capabilities the current Lens chart configuration * Edit inline flyout title changed to `Configuration` no matter the context (this has impact also on creation, i.e. ES|QL new panel) * Within the configuration panel the `Visualization configuration` section title has changed to `Visualization layers` * When the panel is in read-only mode a callout is shown and no editing/saving action is shown ## UX guidance Here's some guidance [inherited by @MichaelMarcialis comment](elastic#208554 (comment)) about the different flows based on user permissions. **Read/write UX** * No change **Read-only UX** * The glasses icon's tooltip shows as "View visualization configuration"? * Flyout title should simply be "Configuration" * On second read, "Read only panel changes will revert after closing" sounds a bit odd. Can we change to "Read-only: Changes will be reverted on close"? Also, can we change the callout icon to glasses? * Change "Visualization configuration" accordion title to "Visualization layers". ### Screenshots **Read-only UX** If user has no write permissions the `glasses` icon is shown for the action:  And the panel is shown with the `read only` callout with no edit buttons:  For a `Managed` dashboard the behaviour is the same as above (for the user there's no difference between regular or managed dashboard, just wanted to report here both cases):   ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com> Co-authored-by: Michael Marcialis <michael.l.marcialis@gmail.com>
Summary
Fixes #106553
This PR enables the Read Only editor feature for Lens panels, who will let users in read mode (no matter broader permissions) to explore the visualization configuration.
Short list of changes:
Edit {name}intoEdit {name} configurationisEditingEnabledtakes into account now alsoManagedstate of both visualization andparentApishowConfigActionhas been created to show users without write capabilities the current Lens chart configurationConfigurationno matter the context (this has impact also on creation, i.e. ES|QL new panel)Visualization configurationsection title has changed toVisualization layersUX guidance
Here's some guidance inherited by @MichaelMarcialis comment about the different flows based on user permissions.
Read/write UX
Read-only UX
Screenshots
Read-only UX
If user has no write permissions the


glassesicon is shown for the action:And the panel is shown with the
read onlycallout with no edit buttons:For a


Manageddashboard the behaviour is the same as above (for the user there's no difference between regular or managed dashboard, just wanted to report here both cases):Checklist