Skip to content

Conversation

@kindsun
Copy link
Contributor

@kindsun kindsun commented Mar 23, 2021

Fixes #94638. The logic to redirect to a different URL was handled one component higher and only on initial load of the list component/page. This PR:

  • Removes the parent component which really wan't necessary
  • Consolidates duplicate saved map retrieval functionality
  • Eliminates an extra call to get saved maps
  • Preserves the redirect on nav to maps list when no maps are present, shows an empty list on delete w/o redirect

Peek 2021-03-25 16-00

@kindsun kindsun added release_note:fix Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.13.0 v7.12.1 labels Mar 23, 2021
@kindsun kindsun requested a review from nreese March 23, 2021 00:18
@elasticmachine
Copy link
Contributor

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

@nreese
Copy link
Contributor

nreese commented Mar 23, 2021

Is redirecting to new map required? I find it is kind of jolting. How about just showing an empty state like visualize and dashboard?

@kindsun
Copy link
Contributor Author

kindsun commented Mar 23, 2021

Is redirecting to new map required? I find it is kind of jolting. How about just showing an empty state like visualize and dashboard?

Because we'd end up in an orphaned state/route situation. Maps currently redirects if a user lands on /app/maps/ and there are no saved maps. If a user deletes all Maps in the list, there's really nothing they can do there except create a map. Also, if a user were to refresh the page, it would redirect them to create a map. Mostly we should just be consistent regardless of which behavior we like better, either consistently redirect or consistently show an empty list.

@nreese
Copy link
Contributor

nreese commented Mar 23, 2021

I think that is ok to be on a route that would change if refreshed. As a user, I would not expect deleting the last map to re-route me to a new map. It just seems like a weird interaction.

Maybe we should re-consider the reroute to a new map if there are no map saved objects. Maybe we should strive for consistency with dashboard and visualize and always show a landing page.

@kindsun
Copy link
Contributor Author

kindsun commented Mar 23, 2021

I think that is ok to be on a route that would change if refreshed. As a user, I would not expect deleting the last map to re-route me to a new map. It just seems like a weird interaction.

As a user, I would expect first consistency within the app and then more broadly consistency within Kibana. I think the weirdness you're referencing is equally applicable to the normal flow, I address this a little more below.

Maybe we should re-consider the reroute to a new map if there are no map saved objects. Maybe we should strive for consistency with dashboard and visualize and always show a landing page.

Agreed. I've been on the fence on whether or not the redirect makes sense for about as long as it's been in place. I've created a separate issue to address it #95178.

@nreese
Copy link
Contributor

nreese commented Mar 23, 2021

Agreed. I've been on the fence on whether or not the redirect makes sense for about as long as it's been in place. I've created a separate issue to address it #95178.

Thanks for opening the issue. I would think these are linked and the fix for #94638 is not to redirect but to have an empty listing view.

@kindsun
Copy link
Contributor Author

kindsun commented Mar 23, 2021

Thanks for opening the issue. I would think these are linked and the fix for #94638 is not to redirect but to have an empty listing view.

I believe they're related but separate issues. The goal of the fix for #94638 should be to put the user into a usable and consistent route/state on delete of all maps saved objects. As it currently stands in the Maps app, we define that useable and consistent state of 0 map saved objects + route: /app/maps/ = redirect to /app/maps/map. Reconsidering the redirect behavior for this route is a broader topic triggerable from a few access points that ultimately amounts to a feature change. It should be a separate conversation from this fix.

@kindsun kindsun requested a review from a team as a code owner March 25, 2021 21:57
@kindsun
Copy link
Contributor Author

kindsun commented Mar 25, 2021

@elasticmachine merge upstream

@kindsun kindsun changed the title [Maps] Redirect to Maps app when all saved maps in list deleted [Maps] Show empty list when all saved maps in list deleted Mar 25, 2021
@kindsun kindsun requested a review from a team as a code owner March 26, 2021 15:37
@kindsun kindsun requested a review from lizozom March 31, 2021 01:50
Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

LGTM once green

@kindsun
Copy link
Contributor Author

kindsun commented Mar 31, 2021

@elasticmachine merge upstream

@kindsun kindsun removed the request for review from a team March 31, 2021 15:08
@kindsun
Copy link
Contributor Author

kindsun commented Mar 31, 2021

After some offline conversation I've rolled this back to just the changes to the table list view component. We can handle any further changes to the routing redirect when we address #94638

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
code review

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kibanaReact 115.5KB 115.1KB -334.0B

History

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

@kindsun kindsun merged commit 5db8027 into elastic:master Apr 1, 2021
@kindsun kindsun deleted the fix-missing-redirect-on-list-delete branch April 1, 2021 01:15
kindsun pushed a commit to kindsun/kibana that referenced this pull request Apr 1, 2021
…5126)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
kindsun pushed a commit to kindsun/kibana that referenced this pull request Apr 1, 2021
…5126)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
kindsun pushed a commit that referenced this pull request Apr 1, 2021
…96010)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
kindsun pushed a commit that referenced this pull request Apr 1, 2021
…96009)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:fix Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v7.12.1 v7.13.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Maps] If user deletes all the maps from maps app listing table - Kibana just displays a blank screen

5 participants