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] Design updates for draw shape mode and timeslider #103493

Merged
merged 17 commits into from
Jun 29, 2021

Conversation

elizabetdev
Copy link
Contributor

@elizabetdev elizabetdev commented Jun 28, 2021

Summary

This PR closes #102537.

Draw shape mode

  • It adds an exit button "Exit feature editing" to layer TOC. This way we don't need a badge indicating that we are in editing mode because the exit button is clear.
  • Once we enter in "feature editing" mode the feature edit tools animate to indicate that those tools were added.

Timeslider

  • Once we open the "timeslider" it animates
  • The new icons were added: "playFilled", "framePrevious" and "frameNext". For the next design iterations, we will need a new pause icon. The "timeslider" icon was also replaced with the new one.
  • Removed the styles overriding the EuiDualRange. Once Upgrade EUI to v34.5.1 #103297 is merged the new styles are going to be applied so we don't need the overrides.
  • Added active styles for the timeslider toolbar button.

Preview

Screen+Recording+2021-06-28+at+07.17+PM.mov

Missing

  • Following new layer addition, show edit tools

Checklist

@elizabetdev elizabetdev requested a review from a team as a code owner June 28, 2021 14:46
@elizabetdev elizabetdev added enhancement New value added to drive a business result [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation labels Jun 28, 2021
@elasticmachine
Copy link
Contributor

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

@elizabetdev elizabetdev added release_note:skip Skip the PR/issue when compiling release notes v7.14.0 labels Jun 28, 2021
@elizabetdev elizabetdev requested a review from kindsun June 28, 2021 14:50
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

LGTM - looks great
code review

@kmartastic
Copy link
Contributor

@miukimiu
I believe the editing label should be changed from "Exit feature editing" to either:

  1. Stop feature editing
  2. Stop editing
    @gchaps do you have an opinion?

Why does the timeslider "wobble" when it is first shown?

@elizabetdev
Copy link
Contributor Author

@kmartastic

As per my description:

Once we open the "timeslider" it animates

It's an animation. I was thinking like "I'm here, in case you didn't notice!". But if it's too much I can remove it. 😛

@gchaps and @kmartastic for the labels I think we should be more in sync with this description:

Screenshot 2021-06-28 at 17 15 05

In one place we call it "add shapes" and in other places "features". I think "features" is not a very descriptive name. So should it be "Stop shapes editing"? And inside the popover "Edit shapes" instead of "Edit features"?

Screenshot 2021-06-28 at 17 18 40

@elizabetdev
Copy link
Contributor Author

@elasticmachine merge upstream

@nreese
Copy link
Contributor

nreese commented Jun 28, 2021

@miukimiu
Looks like Upgrade EUI to v34.5.1 is merged. Would you mind setting isDraggable to true for the EuiDualRange control in Timeslider?

@elizabetdev
Copy link
Contributor Author

@nreese yes. 👍🏽

@nreese
Copy link
Contributor

nreese commented Jun 28, 2021

I believe the editing label should be changed from "Exit feature editing" to either:
Stop feature editing
Stop editing
@gchaps do you have an opinion?
Why does the timeslider "wobble" when it is first shown?

I think its important to keep the word "feature". "Stop editing" is too vague. Are you stopping editing the layer settings or stopping editing the features of the layer.

I like prefer "Exit feature editing" over "Stop feature editing" for what its worth.

@elizabetdev
Copy link
Contributor Author

@kmartastic the timeslider animation was updated.

@nreese the isDraggable prop is now set to true.

The video on top of the page was also updated with the new changes.

@kindsun
Copy link
Contributor

kindsun commented Jun 28, 2021

@nreese Would you mind taking a look at the changes I introduced in the linked commit to show edit tools only for new vector layers?
@miukimiu With edit tools showing on new vector layer add, did you still want to show an indicator to the user to focus their attention on them after adding the new layer?

@kindsun kindsun requested a review from nreese June 28, 2021 18:50
@elizabetdev
Copy link
Contributor Author

@aaronjcaldwell I think for beta we can move without the indication.

@nreese nreese closed this Jun 28, 2021
@nreese nreese reopened this Jun 28, 2021
@nreese
Copy link
Contributor

nreese commented Jun 28, 2021

sorry for closing. Not sure what happened.

@kindsun
Copy link
Contributor

kindsun commented Jun 28, 2021

Your comment says "to show edit tools only for new vector layers" but it looks like the functionallity is to auto enable

Discussed offline, but for documentation purposes: In the flow of adding a new, empty vector layer, we want to show the edit tools automatically. To be clear, this only happens once when the layer is added initially. After this, showing edit tools functions as you would expect for any eligible layer.

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

I think this is a pretty clean way to auto opening edit menu for a newly created draw layer. LGTM with minor feedback on names and some duplicated state.

Copy link
Contributor

@kindsun kindsun left a comment

Choose a reason for hiding this comment

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

lgtm w/ green CI! Thanks for the polish! 🎆 A few notes:

  • Pushed up the changes we discussed: show edit tools when adding a new vector layer. Also made some additional follow-on changes requested in feedback
  • Regenerated a jest test snapshot that had changed with the addition of a react property
  • Added one more dispatched function to cancelEditing for consistency with similar functions

Review:

  • tested locally in chrome
  • code review

@elizabetdev
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Code review. LGTM. Small comment on the sass.

}
}

@keyframes pulse {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit. Might want to prefix these similar to the rest of the sass?

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 741 740 -1

Async chunks

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

id before after diff
maps 3.1MB 3.1MB +1.4KB

History

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

@elizabetdev
Copy link
Contributor Author

FYI I changed the "Exit feature editing". Now we're showing an "Edit features" label (same from the popover) and then an "Exit" after it. This solution was suggested by @mdefazio and I think it's more consistent with what we're showing inside the popover.

Screenshot 2021-06-29 at 17 06 27

Screenshot 2021-06-29 at 17 34 24

@elizabetdev elizabetdev merged commit 8c0407a into elastic:master Jun 29, 2021
elizabetdev added a commit to elizabetdev/kibana that referenced this pull request Jun 29, 2021
)

* Timeslider icons and styles

* Exit feature editing. Animations for toolbar and timeslider

* Removing unnecessary line

* Adding padding to tooltip field popover

* Adding pulse animation on open timeslider

* Adding isDraggable to timeslider

* More timeslider styles

* Better positioning of the exit edit mode button

* Enable edit mode when new vector layer added

* Review feedback. Update action name. Remove unneeded component state

* Minor updates. One more action for cancel. Type updates. Snapshot update

* fixing tests and eslint error

* Added new exit mode design. Renamed animations

* Features instead of feature to be consistent with popover

* fix type error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aaron Caldwell <aaron.caldwell@elastic.co>
elizabetdev added a commit that referenced this pull request Jun 29, 2021
…103716)

* Timeslider icons and styles

* Exit feature editing. Animations for toolbar and timeslider

* Removing unnecessary line

* Adding padding to tooltip field popover

* Adding pulse animation on open timeslider

* Adding isDraggable to timeslider

* More timeslider styles

* Better positioning of the exit edit mode button

* Enable edit mode when new vector layer added

* Review feedback. Update action name. Remove unneeded component state

* Minor updates. One more action for cancel. Type updates. Snapshot update

* fixing tests and eslint error

* Added new exit mode design. Renamed animations

* Features instead of feature to be consistent with popover

* fix type error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aaron Caldwell <aaron.caldwell@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aaron Caldwell <aaron.caldwell@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation enhancement New value added to drive a business result release_note:skip Skip the PR/issue when compiling release notes v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps] Improve new draw shape flow
7 participants