Giter Site home page Giter Site logo

Comments (5)

ciscoheat avatar ciscoheat commented on June 15, 2024

The intent of posted is to be true as soon as the form has been posted.

from sveltekit-superforms.

shellicar avatar shellicar commented on June 15, 2024

I'm not sure I understand your response.
What is the definition of posted?
Surely the sequence is submitting -> posted?
How can the form be posted if it was never submitted?

The way it has always worked is that unless the form is posted to the server, posted is not set to true.
If the data is invalid with client-side validation, then there is no submission and therefore posted is not true.
If the cancel function is called during onUpdate, it is also not set to true.
At least when the SPA mode is set to true.

This change completely breaks the functionality that I have been depending on and has been that way since I started using the library in 1.x.

If the data is not posted to the server because of errors, then it is not posted, correct?
If this was intended to change or be "fixed", why is it not noted in the release notes for 2.8.0?
And if so, what store can I use to determine if the form has been submitted succesfully to the server?

from sveltekit-superforms.

ciscoheat avatar ciscoheat commented on June 15, 2024

You expect too much, it's an open source project. Please contribute some falling tests if you've found a regression.

from sveltekit-superforms.

shellicar avatar shellicar commented on June 15, 2024

For what it's worth this is currently my favourite library, and I really appreciate all the work and effort that is going in it, and to maintain it.

It seems like you think I am being unreasonable. I am reporting what I believe is a bug.
I felt that your initial response was quite dismissive, and made it seem like it wasn't a bug or was by design, so I provided more information and seek clarification.
What expectations do you think I have that are too much?

I am willing to conceded that the behaviour I am depending on is not specifically intended in SPA mode.
I am probably in the minority when it comes to the way that I use sveltekit & superforms.
But there doesn't seem to be enough information on what the posted store is intended for use for and how it behaves in certain situations.

I have spent a lot of time investigating every bug I encounter in order to make sure it is a bug, even tracking down the exact version change that it happened in. And testing things out in the REPLs (which are often quite buggy) to make sure it's not something weird going on in my machine.

I'd be happy to contribute if it helps improve the library, although my time is quite limited at the moment.
If you can point me in the right direction for writing some tests, I'll have a look when I have a chance.

from sveltekit-superforms.

ciscoheat avatar ciscoheat commented on June 15, 2024

You seem to expect no regressions and that the documentation and changelog should be fully updated, which is unrealistic for an open source project with a single maintainer and a few very kind sponsors.

You say your time is quite limited, well, it's the same for others. But that's how it is with OSS, you pay with your time.

superForm and superValidate are the two functions that should be used for testing the posted store, here they are: https://github.com/ciscoheat/sveltekit-superforms/tree/main/src/tests

from sveltekit-superforms.

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.