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

Navigation flow with modals #6

Open
micahlt opened this issue Jan 24, 2021 · 18 comments
Open

Navigation flow with modals #6

micahlt opened this issue Jan 24, 2021 · 18 comments
Labels
bug Something isn't working help wanted Extra attention is needed invalid This doesn't seem right ionic Related to Ionic Framework platform:android Related to Itchy packaged for Android priority : will vue Related to Vue, Vuex, or Vue Router

Comments

@micahlt
Copy link
Member

micahlt commented Jan 24, 2021

Since we're using <ion-modal> components to implement projects, profiles, and studios, there are a few issues with navigation. When clicking a project link from another project, the back button goes back to the explore tab. We need to fix that by making it move back to the previous project.

@micahlt micahlt added bug Something isn't working help wanted Extra attention is needed ionic Related to Ionic Framework platform:android Related to Itchy packaged for Android vue Related to Vue, Vuex, or Vue Router labels Jan 24, 2021
@moeenio
Copy link
Member

moeenio commented Jan 24, 2021

couldn't we create a new ion-modal for each clicked link?

@micahlt
Copy link
Member Author

micahlt commented Jan 24, 2021

@locness3 I've considered that - however, modals are quite literally overlaid on top of the current view. As someone follows more and more links, the DOM will become massive and cause lag in the application.

@moeenio
Copy link
Member

moeenio commented Jan 25, 2021

Except if you remove the DOM of non-visible modals - or just use something else than modals for what's the main content of the app.

@micahlt
Copy link
Member Author

micahlt commented Jan 25, 2021

@locness3 That's possible, but it would be very difficult due to the structured nature of Ionic Vue - maybe you'd like to take a stab at it?

@moeenio
Copy link
Member

moeenio commented Jan 26, 2021

When I get some time

@moeenio
Copy link
Member

moeenio commented Feb 11, 2021

At the time, I wasn't aware about all routing stuff. I think, we should create a seperate page/endpoint/route/whatever you name it ProjectPage.vue, and just navigate to it with a query parameter for the project ID. AFAIK, ionic ensures we get a smooth navigation without a full refresh.

@micahlt
Copy link
Member Author

micahlt commented Feb 11, 2021

I can work on that. Of course, this isn't top priority right now. The only reason I didn't consider doing this in the first place was that I'm not sure that Ionic will handle transitions if the project page is not a tab (since we're using a tab-based layout).

@moeenio
Copy link
Member

moeenio commented Feb 11, 2021

Needs some testing, but I'd think it makes a smooth navigation no matter what.

@moeenio
Copy link
Member

moeenio commented Feb 11, 2021

... it doesn't, even when using an ion-router-link

@moeenio
Copy link
Member

moeenio commented Feb 11, 2021

Or maybe it would with ion-nav-link? I don't understand how to set that up.

@moeenio
Copy link
Member

moeenio commented Mar 3, 2021

Okay, it looks like we have to use <router-link> from vue-router. To import it (hopefully saves you from guessing or googling) :

import { RouterLink } from "vue-router";
export default {
  ...
  components: {
    RouterLink
  }
}

@micahlt
Copy link
Member Author

micahlt commented Apr 2, 2021

@locness3 So we essentially need to use a <router-link> whenever opening a project?

@moeenio
Copy link
Member

moeenio commented Apr 3, 2021

Yes, with the project page being its own route.

@micahlt
Copy link
Member Author

micahlt commented Apr 3, 2021

@locness3 Ah, so just get rid of the modals. All righty, sounds good. I'll test it out.

@micahlt
Copy link
Member Author

micahlt commented Feb 1, 2022

I fixed the problems with modal navigation in 17711bb. Closing now.

@micahlt micahlt closed this as completed Feb 1, 2022
@moeenio
Copy link
Member

moeenio commented Feb 1, 2022

Should be using the router, but whatever

@micahlt
Copy link
Member Author

micahlt commented Feb 1, 2022

In the future if it becomes a problem I'll change it. For now it works fine.

@moeenio
Copy link
Member

moeenio commented Aug 20, 2022

Re-opening because using proper routes instead of modals would improve the structure of the code.

@moeenio moeenio reopened this Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed invalid This doesn't seem right ionic Related to Ionic Framework platform:android Related to Itchy packaged for Android priority : will vue Related to Vue, Vuex, or Vue Router
Projects
None yet
Development

No branches or pull requests

2 participants