Git Product home page Git Product logo

Comments (6)

Anthodpnt avatar Anthodpnt commented on August 10, 2024 1

Ok fine, well look at it and enable transition for same pathname with parameters !

Have a nice day,
Anthodpnt

from highway.

ThaoD5 avatar ThaoD5 commented on August 10, 2024 1

Hello @TristanPct ,
The fix provided is only a quick fix to avoid having no redirection at all.

For the moment it's not ideal but we are going to look deeper into this issue when time comes :-)

Best regards,
Thao

from highway.

Anthodpnt avatar Anthodpnt commented on August 10, 2024

Hi @TristanPct,

You're right, thanks for your investigation !
It's really helpful since we couldn't cover all scenarios.

Indeed for now we are only checking for anchors in URL but not for parameters...
We will fix it as soon as possible and use the same technique as for the anchors...

This means we will probably hard-reload the page for parameters instead of using the transition.
It doesn't make sense to trigger a transition to come back on the same page, does it ?

Thanks again and we'll keep you in touch ASAP with a fix...
Until then don't hesitate to try the v2.0.0-beta that comes with some other fixes...

Best regards,
Anthodpnt

from highway.

TristanPct avatar TristanPct commented on August 10, 2024

I have a doubt with the hard reload, url parameters can be used for pagination, http://example.com/listing and http://example.com/listing?page=2 share the same url but are not really the same pages and a transition could be nice.

from highway.

TristanPct avatar TristanPct commented on August 10, 2024

I've just test the 1.3.9 release with url parameters and it does a full page reload every time I goes to an url with params (from index to index?param=1 or from index to page?param=1).

Here is my sample test files:

index.php
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Index</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="scripts/highway-1.3.9.js"></script>
</head>
<body router-wrapper>
    <div router-view="index">
        <?php echo $_SERVER['REQUEST_URI'] ?>
        <hr>
        <a href="page.php">Go to /page.php</a>
        <br>
        <a href="page.php?param=1">Go to /page.php?param=1</a>
        <br>
        <a href="index.php?param=new">Go to /index.php?param=new</a>
    </div>
    <script src="scripts/main.js"></script>
</body>
</html>
page.php
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="scripts/highway-1.3.9.js"></script>
</head>
<body router-wrapper>
    <div router-view="test-page">
        <?php echo $_SERVER['REQUEST_URI'] ?>
        <hr>
        <a href="index.php">Go to /index.php</a>
        <br>
        <a href="index.php?param=1">Go to /index.php?param=1</a>
        <br>
        <a href="page.php?param=new">Go to /page.php?param=new</a>
    </div>
    <script src="scripts/main.js"></script>
</body>
</html>

main.js only start Highway without options.

from highway.

Anthodpnt avatar Anthodpnt commented on August 10, 2024

@TristanPct The release the v2.0.0 version of Highway will solve this issue. The transitions are now launched when parameters are added or removed from the URL even if the pathname is the same. You can find an example on the demo website.

Best regards,
Anthodpnt

from highway.

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.