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

Add modals to the router and history state #246

Closed
robiningelbrecht opened this issue Feb 6, 2025 · 3 comments · Fixed by #270
Closed

Add modals to the router and history state #246

robiningelbrecht opened this issue Feb 6, 2025 · 3 comments · Fixed by #270
Assignees
Labels
improvement improvement to existing feature

Comments

@robiningelbrecht
Copy link
Owner

robiningelbrecht commented Feb 6, 2025

better approach to suggestion in #240. This will allow users to use the browser "back" button to navigate back to the previous page and/or modal

@robiningelbrecht robiningelbrecht added the improvement improvement to existing feature label Feb 6, 2025
@robiningelbrecht robiningelbrecht self-assigned this Feb 6, 2025
@robiningelbrecht
Copy link
Owner Author

cc arminus

@robiningelbrecht
Copy link
Owner Author

robiningelbrecht commented Feb 10, 2025

@FoxxMD I'd like to have a second opinion (if you have one).

Currently the app has a simple router built in javascript that fetches the main content via ajax when an URI is clicked. The History API manages back and forward navigations. The advantage of this approach is that it's very fast because there's no need to bootstrap Symfony on every new request. The downside is... I have to manage routing, which sucks now that I want to add modals in to the mix.

I'm thinking of starting to use the Symfony routing component. Advantage is that adding modals to the mix is way easier. Disadvantage is that the app will be slower because we need to bootstrap Symfony.

Feedback? :p

@FoxxMD
Copy link
Contributor

FoxxMD commented Feb 10, 2025

My opinion is pretty heavily biased and probably not what you want haha. I always avoid server-side rendering when possible. I like to keep the backend and frontend separate applications whenever feasible to self-enforce clean interface contracts (API) on myself. IMO it always makes inevitable refactoring easier since they aren't tightly coupled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement improvement to existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants