nitro_kit 2.0.0.alpha.3 → 2.0.0.alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +179 -0
- data/README.md +22 -26
- data/STYLE_GUIDE.md +10 -0
- data/app/assets/stylesheets/nitro_kit-tailwind-v4.css +3 -3
- data/app/assets/stylesheets/nitro_kit.css +1220 -572
- data/app/components/nitro_kit/accordion.rb +1 -19
- data/app/components/nitro_kit/alert.rb +1 -11
- data/app/components/nitro_kit/app_navigation.rb +44 -9
- data/app/components/nitro_kit/appearance_picker.rb +10 -1
- data/app/components/nitro_kit/badge.rb +13 -4
- data/app/components/nitro_kit/combobox.rb +1 -17
- data/app/components/nitro_kit/command_palette.rb +1 -0
- data/app/components/nitro_kit/dropzone.rb +1 -1
- data/app/components/nitro_kit/form_builder.rb +1 -1
- data/app/components/nitro_kit/select.rb +1 -14
- data/app/components/nitro_kit/tabs.rb +1 -0
- data/app/javascript/controllers/nk/command_palette_controller.js +4 -0
- data/app/javascript/controllers/nk/tabs_controller.js +13 -1
- data/docs/agent_guide.md +63 -138
- data/docs/agent_native_spec.md +72 -400
- data/docs/browser_support.md +77 -188
- data/docs/component_contracts.md +56 -36
- data/docs/customization.md +675 -89
- data/docs/hotwire.md +61 -99
- data/docs/initialization_prompt.md +27 -57
- data/docs/migration_1_to_2.md +34 -18
- data/docs/patterns/application_foundation.md +45 -121
- data/docs/patterns/crud_resource.md +44 -129
- data/docs/patterns/destructive_action.md +45 -102
- data/docs/patterns/flash_and_toast.md +18 -36
- data/docs/patterns/inline_edit.md +21 -44
- data/docs/patterns/queryable_collection.md +65 -161
- data/docs/patterns/resource_form.md +33 -81
- data/docs/rails_conventions.md +38 -78
- data/docs/rails_integration.md +96 -474
- data/lib/nitro_kit/installation.rb +11 -3
- data/lib/nitro_kit/migration_inventory.rb +15 -8
- data/lib/nitro_kit/version.rb +1 -1
- data/plugins/nitro-kit/skills/nitro-kit-rails/SKILL.md +7 -0
- data/plugins/nitro-kit/skills/nitro-kit-ui/SKILL.md +15 -8
- data/src/stylesheets/nitro_kit/components/accordion.css +4 -4
- data/src/stylesheets/nitro_kit/components/alert.css +20 -29
- data/src/stylesheets/nitro_kit/components/app_navigation.css +74 -2
- data/src/stylesheets/nitro_kit/components/app_shell.css +3 -3
- data/src/stylesheets/nitro_kit/components/appearance_picker.css +20 -8
- data/src/stylesheets/nitro_kit/components/auth_shell.css +2 -2
- data/src/stylesheets/nitro_kit/components/avatar.css +12 -8
- data/src/stylesheets/nitro_kit/components/avatar_stack.css +12 -10
- data/src/stylesheets/nitro_kit/components/badge.css +13 -9
- data/src/stylesheets/nitro_kit/components/button.css +42 -25
- data/src/stylesheets/nitro_kit/components/card.css +2 -2
- data/src/stylesheets/nitro_kit/components/checkbox.css +29 -46
- data/src/stylesheets/nitro_kit/components/checkbox_group.css +3 -3
- data/src/stylesheets/nitro_kit/components/combobox.css +6 -6
- data/src/stylesheets/nitro_kit/components/command_palette.css +62 -4
- data/src/stylesheets/nitro_kit/components/container.css +6 -6
- data/src/stylesheets/nitro_kit/components/control_group.css +9 -9
- data/src/stylesheets/nitro_kit/components/danger_zone.css +6 -6
- data/src/stylesheets/nitro_kit/components/data_section.css +4 -4
- data/src/stylesheets/nitro_kit/components/details_table.css +7 -5
- data/src/stylesheets/nitro_kit/components/dialog.css +3 -3
- data/src/stylesheets/nitro_kit/components/dropdown.css +7 -7
- data/src/stylesheets/nitro_kit/components/dropzone.css +7 -7
- data/src/stylesheets/nitro_kit/components/empty_state.css +4 -4
- data/src/stylesheets/nitro_kit/components/field.css +2 -2
- data/src/stylesheets/nitro_kit/components/fieldset.css +2 -2
- data/src/stylesheets/nitro_kit/components/flex.css +1 -1
- data/src/stylesheets/nitro_kit/components/grid.css +1 -1
- data/src/stylesheets/nitro_kit/components/icon.css +5 -5
- data/src/stylesheets/nitro_kit/components/input.css +33 -6
- data/src/stylesheets/nitro_kit/components/page_header.css +4 -4
- data/src/stylesheets/nitro_kit/components/pagination.css +3 -3
- data/src/stylesheets/nitro_kit/components/pagination_bar.css +2 -2
- data/src/stylesheets/nitro_kit/components/palette.css +140 -72
- data/src/stylesheets/nitro_kit/components/progressive_image.css +1 -1
- data/src/stylesheets/nitro_kit/components/radio_button.css +28 -33
- data/src/stylesheets/nitro_kit/components/radio_button_group.css +6 -6
- data/src/stylesheets/nitro_kit/components/rich_text_area.css +2 -2
- data/src/stylesheets/nitro_kit/components/select.css +24 -8
- data/src/stylesheets/nitro_kit/components/settings_layout.css +5 -5
- data/src/stylesheets/nitro_kit/components/settings_section.css +2 -2
- data/src/stylesheets/nitro_kit/components/sheet.css +10 -10
- data/src/stylesheets/nitro_kit/components/stat_grid.css +1 -1
- data/src/stylesheets/nitro_kit/components/switch.css +34 -40
- data/src/stylesheets/nitro_kit/components/table.css +8 -4
- data/src/stylesheets/nitro_kit/components/tabs.css +5 -1
- data/src/stylesheets/nitro_kit/components/textarea.css +20 -5
- data/src/stylesheets/nitro_kit/components/toast.css +11 -58
- data/src/stylesheets/nitro_kit/components/toolbar.css +2 -2
- data/src/stylesheets/nitro_kit/components/tooltip.css +4 -0
- data/src/stylesheets/nitro_kit/components/typeset.css +4 -4
- data/src/stylesheets/nitro_kit/reset.css +6 -6
- data/src/stylesheets/nitro_kit/tokens.css +497 -74
- metadata +1 -2
- data/docs/new_app_strategy.md +0 -22
data/docs/browser_support.md
CHANGED
|
@@ -1,193 +1,82 @@
|
|
|
1
1
|
# Browser support
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
promise the full descendant styling of the scoped path.
|
|
51
|
-
|
|
52
|
-
Applications should not need to copy Nitro controllers or install a general
|
|
53
|
-
polyfill bundle for a Nitro-owned component. Browsers outside a release's matrix
|
|
54
|
-
may still work, but Nitro does not promise fixes for them.
|
|
3
|
+
**Audience:** Application developers and coding agents evaluating Nitro Kit
|
|
4
|
+
compatibility. Core maintainers use this policy when changing components.
|
|
5
|
+
|
|
6
|
+
Nitro Kit targets current stable and widely used evergreen Chrome, Edge,
|
|
7
|
+
Firefox, macOS Safari, and iOS Safari releases from roughly the previous two
|
|
8
|
+
years. Mobile Safari is a first-class target. Browsers outside that window may
|
|
9
|
+
work, but are not guaranteed fixes.
|
|
10
|
+
|
|
11
|
+
Support means essential content and actions remain usable and accessible. It
|
|
12
|
+
does not promise pixel-identical rendering, animation, wrapping, or overlay
|
|
13
|
+
placement. Nitro adopts modern standards when it can preserve essential
|
|
14
|
+
behavior with capability detection and a focused fallback.
|
|
15
|
+
|
|
16
|
+
Normal support assumes Nitro Kit's documented JavaScript is installed. The
|
|
17
|
+
matrix below defines the reduced baseline when Nitro JavaScript, Stimulus, and
|
|
18
|
+
Turbo are absent. A server-rendered HTML response is not automatically a JavaScript-free
|
|
19
|
+
interaction: it may still be inside a closed dialog or depend
|
|
20
|
+
on Turbo transport.
|
|
21
|
+
|
|
22
|
+
## Without Nitro JavaScript
|
|
23
|
+
|
|
24
|
+
- **Full** — essential content and actions remain available.
|
|
25
|
+
- **Reduced** — useful content or a simpler native interaction remains, but
|
|
26
|
+
part of the defining behavior is absent.
|
|
27
|
+
- **Unavailable** — the defining interaction cannot be completed. Critical
|
|
28
|
+
actions need an ordinary server-rendered route outside the component.
|
|
29
|
+
|
|
30
|
+
| Component or family | Baseline without JavaScript |
|
|
31
|
+
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
32
|
+
| Links, Button, ButtonTo, ordinary forms | **Full.** Native navigation and submission work; Turbo feedback and confirmation do not. |
|
|
33
|
+
| Input, Select, Textarea, Switch, RadioButton, Checkbox | **Full.** Indeterminate Checkbox is **Reduced** because `indeterminate` is a DOM property. |
|
|
34
|
+
| Accordion | **Full.** Single grouping is **Reduced** where named `details` is unsupported. |
|
|
35
|
+
| AppShell | **Full.** Navigation remains in document flow instead of becoming a drawer. |
|
|
36
|
+
| Appearance | **Reduced.** CSS follows system preference; a picker cannot persist changes. |
|
|
37
|
+
| Avatar | **Reduced.** The image and fallback render, but image failure does not reveal the fallback. |
|
|
38
|
+
| Combobox | **Full.** The native Select remains; searchable listbox behavior is absent. |
|
|
39
|
+
| Dialog and Sheet | **Reduced** with Invoker Commands; otherwise **Unavailable** while closed. |
|
|
40
|
+
| CommandPalette | **Reduced** with Invoker Commands; otherwise **Unavailable** while closed. Search, shortcuts, and Turbo results are absent. |
|
|
41
|
+
| Dropdown | **Reduced.** Native Popover works; menu keyboard behavior, focus restoration, trigger-relative placement, and the WebKit outside-pointer fallback are absent. |
|
|
42
|
+
| Dropzone | **Full.** The native file input submits; previews, validation feedback, progress, and direct upload are absent. |
|
|
43
|
+
| RichTextArea | **Unavailable** unless the host editor provides its own fallback. |
|
|
44
|
+
| ProgressiveImage | **Reduced.** The native image loads; enhanced load and error state are absent. |
|
|
45
|
+
| Tabs | **Reduced.** All panels remain visible; single-panel selection and keyboard behavior are absent. |
|
|
46
|
+
| Toast | **Reduced.** Flash content remains; dismissal is absent. |
|
|
47
|
+
| Tooltip | **Reduced.** CSS hover and focus disclosure remain; Escape dismissal is absent. |
|
|
48
|
+
|
|
49
|
+
## Known native limitations
|
|
55
50
|
|
|
56
51
|
### Month and week inputs
|
|
57
52
|
|
|
58
|
-
`
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
part of the component's defining interaction is absent.
|
|
89
|
-
- **Unavailable** means the defining interaction cannot be completed. Critical
|
|
90
|
-
actions need an ordinary server-rendered route outside that component.
|
|
91
|
-
|
|
92
|
-
A server-rendered HTML response is not automatically a JavaScript-free
|
|
93
|
-
interaction. It can still place content in a closed dialog or rely on Turbo to
|
|
94
|
-
submit, replace, or confirm. Likewise, an HTML response branch is the fallback
|
|
95
|
-
for Turbo transport, not proof that the surrounding control works without
|
|
96
|
-
JavaScript.
|
|
97
|
-
|
|
98
|
-
### No-JavaScript component matrix
|
|
99
|
-
|
|
100
|
-
| Component or family | Classification | Concise baseline without JavaScript |
|
|
101
|
-
| ---------------------------------------------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
102
|
-
| Links, Button, ButtonTo, and ordinary forms | Full | Native navigation and submission work. Submission indicators and Turbo transport or confirmation do not. |
|
|
103
|
-
| Input, Select, Textarea, Switch, RadioButton, and Checkbox | Full; reduced for indeterminate Checkbox | Native controls edit and submit. `indeterminate: true` cannot be applied because it is a DOM property; month/week have the separate native-control limitations below. |
|
|
104
|
-
| Accordion | Full; reduced single grouping where named `details` is unsupported | Every `details` opens and closes. Exclusive grouping depends on native shared-`name` support. |
|
|
105
|
-
| AppShell | Full | Navigation stays visible in document flow at narrow widths; the enhanced drawer interaction is absent. |
|
|
106
|
-
| Appearance | Reduced | CSS follows the system preference and server-rendered picker state remains visible, but a picker cannot apply or persist a new choice without the bootstrap runtime and controller. |
|
|
107
|
-
| Avatar | Reduced | The native image and rendered fallback remain, but a failed image is not swapped to its fallback. |
|
|
108
|
-
| Combobox | Full | The labelled native Select remains the named control and submission source; searchable listbox behavior is absent. |
|
|
109
|
-
| Dialog and Sheet | Reduced with Invoker Commands; unavailable without them | Declarative trigger and close controls work only with native Invoker Commands. A server-open nonmodal Dialog remains visible; controller dismissal policy and the compatibility bridge are absent. |
|
|
110
|
-
| CommandPalette | Reduced with Invoker Commands; unavailable without them | Native commands can open the dialog and its destination links navigate, but search, shortcut, announcements, and Turbo results are absent. Without Invoker Commands the closed content is unreachable. |
|
|
111
|
-
| Dropdown | Reduced | Native Popover opens, closes, and light-dismisses. Menu keyboard conventions, focus restoration, collision-aware placement, and Nitro's outside-pointer compatibility fallback are absent; CSS supplies bounded top-left placement. |
|
|
112
|
-
| Dropzone | Full | Its labelled native file input and ordinary form submission work; drag preview, policy feedback, progress, and direct upload are absent. |
|
|
113
|
-
| RichTextArea | Unavailable unless the host editor provides its own fallback | Nitro wraps trusted host-editor markup and does not manufacture a plain-text control. The host editor owns its JavaScript and fallback contract. |
|
|
114
|
-
| ProgressiveImage | Reduced | The native image loads and retains its accessible alternative; decode/load state and the visible error fallback are not enhanced. |
|
|
115
|
-
| Tabs | Reduced | Every panel and its heading control remain visible and reachable; single-panel selection and APG keyboard behavior are absent. |
|
|
116
|
-
| Toast | Reduced | Server-rendered flash content and live-region semantics remain; timed and manual dismissal are absent. |
|
|
117
|
-
| Tooltip | Reduced | CSS hover and focus disclosure remain; Escape dismissal is absent. |
|
|
118
|
-
|
|
119
|
-
Typeset is not interactive, but its no-JavaScript and no-`@scope` CSS path is
|
|
120
|
-
also reduced: the fallback covers the documented semantic subset rather than
|
|
121
|
-
full descendant parity.
|
|
122
|
-
|
|
123
|
-
### Compatibility details
|
|
124
|
-
|
|
125
|
-
#### Accordion
|
|
126
|
-
|
|
127
|
-
Accordion always keeps native `details` and `summary` as the disclosure
|
|
128
|
-
authority. Its no-JavaScript baseline is full for opening and closing each
|
|
129
|
-
item. In `single` mode, a shared `name` is the browser-native exclusive-group
|
|
130
|
-
mechanism: browsers that support named details provide the full one-open-item
|
|
131
|
-
behavior without a Nitro controller.
|
|
132
|
-
|
|
133
|
-
The short Firefox gap before Firefox 130, including Firefox 128 ESR, has a
|
|
134
|
-
reduced `single` baseline: each disclosure still opens and closes normally,
|
|
135
|
-
but more than one item can remain open. Nitro does not detect the browser or
|
|
136
|
-
install JavaScript merely to duplicate that native grouping. Applications for
|
|
137
|
-
which strict one-open-at-a-time behavior is essential in that gap should use a
|
|
138
|
-
different interaction with an application-owned server or JavaScript policy.
|
|
139
|
-
|
|
140
|
-
Browser compatibility is verified against current stable browsers and
|
|
141
|
-
representative older releases near the edge of the support window. Compatibility
|
|
142
|
-
work prioritizes real Safari and iOS Safari coverage in addition to Chromium;
|
|
143
|
-
tests that merely remove an attribute in current Chrome are useful branch tests,
|
|
144
|
-
but are not a substitute for the affected browser engine.
|
|
145
|
-
|
|
146
|
-
Dialog, Sheet, and CommandPalette keep declarative `command`/`commandfor`
|
|
147
|
-
controls in their server markup. With Nitro JavaScript installed, their shared
|
|
148
|
-
controller uses the reflected invoker relationship when available and falls
|
|
149
|
-
back to `HTMLDialogElement.showModal()` or `close()` only when that relationship
|
|
150
|
-
cannot run. Without JavaScript, opening and closing these overlays is available
|
|
151
|
-
only in browsers with Invoker Commands; destination links and ordinary forms
|
|
152
|
-
remain server-rendered, but content inside a closed dialog is not reachable.
|
|
153
|
-
|
|
154
|
-
Each Nitro release records a dated tested-browser matrix. The rolling policy is
|
|
155
|
-
the durable contract; the matrix records the concrete versions used to verify a
|
|
156
|
-
particular release.
|
|
157
|
-
|
|
158
|
-
## Nitro Kit 2.0 release matrix (2026-08-05)
|
|
159
|
-
|
|
160
|
-
This is the release checklist for the next Nitro 2.0 release. “Automated” means
|
|
161
|
-
the Rails/Selenium system suite runs in CI; it does not claim that Selenium
|
|
162
|
-
reproduces every device or browser UI detail. Version numbers are the stable
|
|
163
|
-
targets recorded on this date, and should be refreshed if the release slips.
|
|
164
|
-
|
|
165
|
-
| Target | Near-floor reference | Current release verification | Method |
|
|
166
|
-
| --------------- | -------------------- | ---------------------------- | ----------------------------------------------------- |
|
|
167
|
-
| Chrome desktop | Chrome 128 | Chrome 151 | Automated Ubuntu full-system-suite lane |
|
|
168
|
-
| Edge desktop | Edge 128 | Edge 151 | Manual Chromium release check (same engine as Chrome) |
|
|
169
|
-
| Chrome Android | Chrome 128 | Chrome 151 on Android | Manual real-device check |
|
|
170
|
-
| Firefox desktop | Firefox 128 ESR | Firefox 153 | Automated Ubuntu priority-smoke lane |
|
|
171
|
-
| Safari macOS | Safari 18 | Safari 26.5 | Automated `macos-latest` priority-smoke lane |
|
|
172
|
-
| Safari iOS | Safari 18 / iOS 18 | Safari 26.5 / iOS 26.5 | Manual real-device release check |
|
|
173
|
-
|
|
174
|
-
The automated matrix intentionally tests current Chrome, Firefox, and macOS
|
|
175
|
-
Safari rather than downloading historical binaries. Chrome runs the full
|
|
176
|
-
system suite. Firefox and Safari run `bin/browser-smoke`, the single maintained
|
|
177
|
-
priority lane for Dialog, Sheet, CommandPalette, Dropdown/AppearancePicker,
|
|
178
|
-
Accordion, Hotwire lifecycle, Typeset contracts, and date-family input
|
|
179
|
-
behavior. Chrome DevTools emulation remains Chrome-only coverage and is not
|
|
180
|
-
presented as cross-engine verification. Priority smoke lanes run with one
|
|
181
|
-
worker; Chrome retains the full suite's normal parallelism.
|
|
182
|
-
|
|
183
|
-
Before release, manually repeat those flows on one current Android Chrome and
|
|
184
|
-
one current iPhone Safari, including narrow layout, VoiceOver/TalkBack where
|
|
185
|
-
available, real form submission, and month/week ISO values. Record device OS,
|
|
186
|
-
browser build, date, and any reduced-baseline behavior in the release notes.
|
|
187
|
-
Do not describe the near-floor or iOS rows as automated coverage.
|
|
188
|
-
|
|
189
|
-
The Firefox 128 ESR and older Safari behavior that cannot be installed
|
|
190
|
-
reliably on GitHub-hosted runners is represented by capability-focused tests:
|
|
191
|
-
stripping Invoker Commands and exercising Nitro fallbacks, plus the documented
|
|
192
|
-
native month/week degradation. These branch simulations supplement, but do not
|
|
193
|
-
replace, the dated real-browser checks.
|
|
53
|
+
`month` and `week` remain native input types. Some supported browsers expose
|
|
54
|
+
text entry without a picker, normalization, or reliable `min`, `max`, and
|
|
55
|
+
`step` enforcement. Applications must server-validate `YYYY-MM` or `YYYY-Www`
|
|
56
|
+
plus domain range and increment rules. Use an application-owned Select when an
|
|
57
|
+
exact bounded choice is required.
|
|
58
|
+
|
|
59
|
+
### Dialog commands and Popover
|
|
60
|
+
|
|
61
|
+
Dialog, Sheet, and CommandPalette render declarative `command`/`commandfor`
|
|
62
|
+
controls. With Nitro JavaScript installed, the shared controller uses the
|
|
63
|
+
native relationship when available and falls back to `showModal()` or `close()`.
|
|
64
|
+
Dropdown keeps native Popover as the visibility authority and adds
|
|
65
|
+
keyboard, placement, focus, and WebKit outside-pointer behavior.
|
|
66
|
+
|
|
67
|
+
### CSS feature fallbacks
|
|
68
|
+
|
|
69
|
+
Typeset uses `@scope` with a low-specificity fallback for browsers that do not
|
|
70
|
+
support it. The fallback covers the documented semantic text elements, not
|
|
71
|
+
every possible descendant selector.
|
|
72
|
+
|
|
73
|
+
## Release verification
|
|
74
|
+
|
|
75
|
+
Automated CI runs the full system suite in Chrome and priority browser smoke
|
|
76
|
+
coverage in Firefox and macOS Safari. Before a release, maintainers also verify
|
|
77
|
+
the priority flows on current Android Chrome and iOS Safari. Capability-focused
|
|
78
|
+
tests supplement these runs; they do not prove an untested historical browser
|
|
79
|
+
version.
|
|
80
|
+
|
|
81
|
+
Release notes must record exact browser and device versions actually tested.
|
|
82
|
+
Do not publish planned or simulated versions as verified coverage.
|