Replies: 5 comments
-
|
In terms of using sveltekit's form actions, would it be possible to add an option to the modal to have the primary button be of type submit? or have the buttons as a slot in order to pass in custom buttons. That way we can wrap the modal in a native form and have the whole thing work as intended by sveltekit? |
Beta Was this translation helpful? Give feedback.
-
|
@gohde absolutely. Though the actual implementation is yet-decided, we'll try to find a way to make the modal's buttons submit as a form. The tricky thing with some modals is they don't open easily without JS, so part of the exploration is to find a pattern that would allow the page to fully refresh without JS and display an opened modal that has a submittable form. |
Beta Was this translation helpful? Give feedback.
-
|
I had a similar issue with Tabs and ended up solving it using route params. As you tabbed around it would update the url. It worked fine and I don't see why that couldn't work with this also. [[modal]] or with nested or several modals using [...modals]? |
Beta Was this translation helpful? Give feedback.
-
|
I'm sure it's achievable, I guess I was needlessly concerned with a potential refactor for Modal, but we'll cross that bridge in time. Aspirations include:
|
Beta Was this translation helpful? Give feedback.
-
|
Noticed a few issues with the current
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🚧 Status: Draft 🚧
The following items are needed in order to enable progressive enhancement capabilities for prerendered or server-rendered components:
General: documentation
Add a special section for progressive enhancement, and provide badges for every component that contains explicit support for it. We may also want a checklist system for all components; that way it's clear which components does or does not support certain functionality.
General: Form actions and
hrefSee #1599
components with an inner button should provide a
formAttributesprop that is of type{ formAction: fn } | HTMLAttributes<form>Example:
Underlying component has:
components with inner buttons that can change data or state may receive an
hrefprop, allowing users to choose a new page or the same page withsearchParams, impacting the displayed informationUIShell
WIP
Accordion
WIP
Breakpoint
<Button><Button>can leverage the nativeformactionattribute to set its individual formaction pathuse:enhanceonly applies to<form>elements (see demo for enhanced button formaction); so we would have to either wrap<Button>or advise users to provide their own<form>since<Button>is a primitive single-element componentModal
WIP
DataTable
WIP
Combobox
WIP
Dropdown
WIP
Tabs
WIP
Toggle
WIP
Tooltip, Tooltip Icon, Tooltip Definition
WIP
Theme
WIP
UIShell
:hasand:activein order to keep sub-menus open after clicking on them without JS. Otherwise, we'll consider these 'enhanced with JS' and providehrefprops to the top-most links, and encourage users to provide index pages for top-level linksBeta Was this translation helpful? Give feedback.
All reactions