Coder Social home page Coder Social logo

Comments (11)

jakobrosenberg avatar jakobrosenberg commented on August 29, 2024

Thanks for spotting this. It seems there's something missing in the description.

from routify.dev.

jakobrosenberg avatar jakobrosenberg commented on August 29, 2024

IIRC the behavior is the same as described here.
https://v3.ci.routify.dev/docs#guide/introduction/parameters

from routify.dev.

gianmarco27 avatar gianmarco27 commented on August 29, 2024

Yes, in the V3 documentation this is made way clearer! :)

from routify.dev.

gianmarco27 avatar gianmarco27 commented on August 29, 2024

Thing to be noted tho, during my tests i tryed a usage like "/subfolder/page/:id", while having a fallback page configured at root level in my folder structure, and instead of hitting the "/subfolder/page" with param { page: id }, it was going straight to the root level fallback.

It only worked as intended when i configured it to use only URLSearchParams

from routify.dev.

jakobrosenberg avatar jakobrosenberg commented on August 29, 2024

That sounds like a bug. Can you create a minimal reproducible?

from routify.dev.

gianmarco27 avatar gianmarco27 commented on August 29, 2024

So i tryed to go back and reproduce the behaviour i stated above, but it turns out i was missing the Syntactical sugar section of the V3 documentation, where i should name my destination file wrapped in [ ] to have it work as a path parameter.
No bug in here, just a problem between the chair and the screen.
Thank you for your patience, i hope my feedback can help you make V2 documentation clearer for future use.

from routify.dev.

gianmarco27 avatar gianmarco27 commented on August 29, 2024

I'm not sure this is the right channel, but since i'm in the topic and it could potentially be a new issue, i'm going to introduce it here.
Should it be possible to use path parameters like "/subfolder/page/:id" together with named routes in a $goto helper?
$goto('tools.show', {tool: id}) with file named [tool].svelte

From what i'm testing now, it correctly writes the intended path in the browser history, but routify appears to be routing me back to the "/subfolder/index", by visiting the same url via the $url helper inside a link, or with the "back" browser button i reach correctly the intended page

from routify.dev.

jakobrosenberg avatar jakobrosenberg commented on August 29, 2024

@gianmarco27 I'm not sure I follow. Could you give me a step by step of what you're doing, what's happening and what you're expecting?

from routify.dev.

gianmarco27 avatar gianmarco27 commented on August 29, 2024

Upon a form submission, i'm trying to redirect to a success page which should contain the submitted informations.
So i have setup a $goto on success to the page which is named like [id].svelte.
this page contains <!-- routify:options name="tools.show" -->
and i'm calling $goto('tools.show', {id: slug_number})

I would expect to be redirect to such page on success, what happens instead is i get navigated to such page, and then redirect to the same-level index.svelte file.
if i browse back with the "back" arrow from the browser i land on the [id].svelte page correctly at the url foldername/slug_number.
I tryed creating a reproducible to show you from the starter template but i am unable to reproduce the same ux flow.
I should investigate further my project to understand what is causing the double navigation.

is this type of usage $goto('tools.show', {id: slug_number}) supposed to work and route me to foldername/slug_number?
Thank you for your time

from routify.dev.

jakobrosenberg avatar jakobrosenberg commented on August 29, 2024

I would have expected that to work. Are you using Routify 2?

from routify.dev.

gianmarco27 avatar gianmarco27 commented on August 29, 2024

Yes i'm using 2.18.8
After all turns out it was again a problem on my side.
After the $goto call, more code from the originating page was still being executed causing the weird behaviour

from routify.dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.