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

[Feature] Improve SuperDebug layout, add label and promise options #38

Merged
merged 4 commits into from
Mar 17, 2023

Conversation

lnfel
Copy link
Contributor

@lnfel lnfel commented Mar 17, 2023

What's changed

  • Previously SuperDebug only shows html output if data evaluates to true, now there is no checking and will spit out undefined if data is undefined. In JavaScript knowing whether your data is undefined is crucial.
  • Fix SuperDebug layout in cases where data is undefined or not yet ready, i.e. in cases where loading data async and it takes a while to load.
  • New label prop, useful when using multiple instances of SuperDebug on a page.
  • New promise prop, useful when debugging data coming from a fetch or any promise functions that may take a while to load. It uses svelte's await block to display a message and let users know the data is still loading.
  • New super-debug page route to document all possible use cases of SuperDebug with the proposed changes and see it in action.

I would add documentation on readme if this looks good to you @ciscoheat .

@ciscoheat
Copy link
Owner

Wow, thanks a lot, will release this very soon!

@ciscoheat
Copy link
Owner

@lnfel if you'd like to add documentation for it, can you add it to the Wiki instead of the readme? I'm about to move the whole documentation to a dedicated site. Here's the section for SuperDebug: https://github.com/ciscoheat/sveltekit-superforms/wiki/API-reference#superdebug

*/
let promiseProduct = () => {}
const someObject = {
full_name: "Hubert Blaine Wolfeschlegelsteinhausenbergerdorff Sr."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good old Hubert! 😆

@ciscoheat ciscoheat merged commit 9b71d63 into ciscoheat:main Mar 17, 2023
@lnfel
Copy link
Contributor Author

lnfel commented Mar 17, 2023

@ciscoheat I cloned the wiki and made the changes but I can't push due to permission. Here is the relevant changes that I made in the fork.

https://github.com/lnfel/sveltekit-superforms/wiki/API-reference

@ciscoheat
Copy link
Owner

Sorry, I didn't know about wiki permissions. I'll merge the changes and will add you to it!

@ciscoheat
Copy link
Owner

I've opened the wiki now for editing, can you copy your changes over to it? I have the same permission problem on your site. :) Thanks for your help!

@lnfel
Copy link
Contributor Author

lnfel commented Mar 19, 2023

The doc is now updated!

@ciscoheat
Copy link
Owner

Thank you so much! The 0.6.0 update will be released today or tomorrow, including your nice changes, and being able to use transform/refine/superRefine on the schema, and full support for nested errors and constraints.

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

Successfully merging this pull request may close these issues.

None yet

2 participants