Commit graph

788 commits

Author SHA1 Message Date
Greg Johnston
1e13ad8fee
perf: in hydration, reuse existing text node rather than destroying and remounting (#1506) 2023-08-07 08:34:10 -04:00
mateusvmv
4001561987
fix: scoping of JS variable names in inline scripts (#1489) 2023-08-03 08:46:06 -04:00
Greg Johnston
b86009b9d0 fix: remove erroneous logging 2023-08-02 19:16:32 -04:00
Greg Johnston
56f01888b7
Merge pull request #1486 from leptos-rs/export-all-helpers
fix: correctly export all DOM helpers
2023-08-02 17:02:19 -04:00
Greg Johnston
8320f16716 chore: fix new clippy warnings 2023-08-02 16:05:42 -04:00
Greg Johnston
f837d3e6a2
fix: correctly escape HTML in DynChild text nodes (closes #1475) (#1478) 2023-08-01 13:22:24 -04:00
Greg Johnston
7819a6fac0
fix: properly replace text nodes in DynChild (closes #1456) (#1472) 2023-07-30 22:37:53 -04:00
martin frances
e0b5738606
chore: document the magic number in FILTER_SHOW_COMMENT. (#1468) 2023-07-29 16:53:10 -04:00
Greg Johnston
5740c9b76b
feat: add MaybeProp type (#1443) 2023-07-27 18:18:25 -04:00
Greg Johnston
7bc1ad2b4f
fix: incorrect opening node for <Each/> in debug mode (closes #1168) (#1436) 2023-07-26 10:43:46 -04:00
Greg Johnston
ec4bfb0e8a
chore: resolve clippy incorrect_clone_impl_on_copy_type (closes #1401) (#1418) 2023-07-22 22:14:52 -04:00
Greg Johnston
338d2ab839
Merge pull request #1379 from agilarity/lint-with-clippy
ci: lint with clippy
2023-07-20 14:15:16 -04:00
Greg Johnston
9e7c31d1e4
docs: small issues (#1385) 2023-07-19 08:53:37 -04:00
Joseph Cruz
3af115a663 fix: maybe_misused_cfg 2023-07-18 20:56:39 -04:00
Joseph Cruz
a344804734 fix: incorrect_clone_impl_on_copy_type (allow) 2023-07-18 20:54:51 -04:00
Greg Johnston
47148f2033
perf: exclude hydration code in CSR mode (#1372) 2023-07-17 12:20:33 -04:00
Greg Johnston
f40ae6af30
fix: correctly show fallback for Transition on first load even if not hydrating (#1362) 2023-07-16 15:19:51 -04:00
Greg Johnston
8e68699435
feat: add support for adding CSP nonces (#1348) 2023-07-14 16:37:18 -04:00
Greg Johnston
193aa79956
docs: how not to mutate the DOM during rendering (#1344) 2023-07-13 16:57:07 -04:00
Joseph Cruz
3481a6ee53
build: run tasks from workpace or member directory (#1339) 2023-07-13 16:46:51 -04:00
Greg Johnston
d4b1ceda90
fix: event delegation issue with <input name="host"> (#1332) 2023-07-12 16:20:11 -04:00
Greg Johnston
03a8609680
fix: warning generated by new #[must_use] on views (#1329) 2023-07-12 10:00:05 -04:00
g-re-g
3e40f9cc66
chore: bump indexmap to 2 (#1325) 2023-07-11 15:24:21 -04:00
Martinez
7a4d475cca
docs: update warnings to remove mention of csr as a default feature (#1313) 2023-07-09 20:32:25 -04:00
Greg Johnston
ae3ddcb0e6
docs: must use View (#1302) 2023-07-08 06:42:02 -04:00
g-re-g
bab9f40a81
fix: rework diff functionality for <For/> (#1296) 2023-07-07 15:32:26 -04:00
Greg Johnston
f06ffd72aa
fix: use once_cell::OnceCell rather than std::OnceCell (#1288) 2023-07-05 17:16:51 -04:00
Greg Johnston
83d3d7579c
fix: issue with class hydration not removing classes correctly (closes #1286) (#1287) 2023-07-05 12:00:27 -04:00
Greg Johnston
d81c1a929e
fix: duplicate text nodes during <For/> hydration (closes #1279) (#1281) 2023-07-04 11:50:59 -04:00
Greg Johnston
f69c28df18
fix: improved diagnostics about non-reactive signal access (#1277) 2023-07-03 19:37:15 -04:00
Greg Johnston
81e416b085
fix: error messages in dyn_classes (#1270) 2023-07-03 09:57:50 -04:00
Greg Johnston
0f1ebccad5
fix: clearing <For/> that has a previous sibling in release mode (fixes #1258) (#1267) 2023-07-02 17:27:39 -04:00
Greg Johnston
2f01df6185
fix: HtmlElement::dyn_classes() when adding classes (#1265) 2023-07-02 17:27:24 -04:00
martin frances
c4982319fe
chore: ran cargo clippy --fix and reviewed changes. (#1259) 2023-07-02 17:27:14 -04:00
Greg Johnston
67300adf41
fix: regression in ability to use signals directly in the view in stable (#1254) 2023-06-30 11:59:29 -04:00
Greg Johnston
ee7dbafc85
change: migrate to nightly and csr features rather than stable and default-features = false (#1227) 2023-06-26 21:12:14 -04:00
Greg Johnston
966100c2d6
feat: add an anyhow-like Result type for easier error handling (#1228) 2023-06-25 15:18:00 -04:00
Greg Johnston
9da4084561
fix: nested Suspense/Transition with cascading resources (#1214) 2023-06-21 16:39:58 -04:00
jquesada2016
1d7235d4ca
fix: in <For/>, removed not being cleared when setting a diff to clear, causing panic (#1220) 2023-06-21 15:19:12 -04:00
Greg Johnston
2cb8171105
docs: document <ErrorBoundary/>/<Suspense/> relationship (#1210) 2023-06-21 11:17:20 -04:00
Greg Johnston
8ae5cf0ccf
fix: don't re-mount identical child in DynChild (#1211) 2023-06-19 17:04:08 -04:00
jquesada2016
5f0013e482
fix: reorder <For /> apply_diff steps (#1196) 2023-06-15 20:37:17 -04:00
jquesada2016
97127a90c6
fix: new <For/> bug when clearing which ignores further additions (#1181) 2023-06-14 13:56:56 -04:00
Greg Johnston
a98885a123
fix: <ErrorBoundary/> IDs with new hydration key system (#1180) 2023-06-13 18:38:23 -04:00
jquesada2016
f415f7b146
fix: removes in new <For/> causing panics in some circumstances (#1173) 2023-06-13 15:43:02 -04:00
jquesada2016
b6d9060152
feat: improved <For/> algorithm (#1146)
Rewrites the algorithm behind the `<For/>` component to create a more robust keyed list implementation, with the potential for future additional optimizations related to grouping moved ranges.

Closes #533.
2023-06-11 10:20:14 -04:00
Greg Johnston
55266f2efd
perf: reduce overhead of hydration keys (#1122) 2023-05-31 20:30:31 -04:00
Greg Johnston
5d70275c3a
fix: dispose of runtime when stream is actually finished (closes #1097) (#1110) 2023-05-28 13:44:31 -04:00
Marc-Stefan Cassola
475566837e
feat: added scrollend event (#1105) 2023-05-27 11:04:30 -04:00
Greg Johnston
7ff08615bb
fix: remove debug logs accidentally included 2023-05-27 06:08:08 -04:00
Greg Johnston
2d418dae93
fix: debug-mode bugs in <For/> (closes #955, #1075, #1076) (#1078) 2023-05-22 06:49:13 -04:00
Greg Johnston
a9ed8461d1
feat: add "async routing" feature (#1055)
* add "async routing" feature that waits for async resources to resolve before navigating
* add support for Outlet
* add `<RoutingProgress/>` component
2023-05-21 06:46:23 -04:00
Greg Johnston
2cbf3581c5
fix: docs note on style refers to class (#1066) 2023-05-19 13:42:16 -04:00
Greg Johnston
00fcd1c65e
docs: fix small docs issues (closes #1045) (#1049) 2023-05-16 13:01:29 -04:00
Greg Johnston
85ad7b0f38
fix: <Suspense/> hydration when no resources are read under it (#1046) 2023-05-16 12:20:23 -04:00
Greg Johnston
40c1556f29
change: remove APIs that had been marked deprecated (#1037) 2023-05-12 19:45:48 -04:00
Greg Johnston
d7b919032e
feat: SsrMode::PartiallyBlocked (#1026) 2023-05-10 13:30:01 -04:00
Greg Johnston
1fdb6f1cdf
feat: add style: to view (#1009) 2023-05-06 06:23:20 -04:00
Greg Johnston
59b8626277
docs: switch from compile errors to runtime warnings for incompatible feature flags (#990) 2023-05-03 16:25:35 -04:00
Greg Johnston
1af35cdd3b
feat: add builder syntax for optional event listener (#969) 2023-05-02 15:47:19 -04:00
Roland Fredenhagen
1011c464dc
feat: add collect_view(cx) (#956) 2023-04-28 16:02:24 -04:00
Roland Fredenhagen
fa2e2248d3
feat: impl FromIterator for View (#945) 2023-04-24 20:07:27 -04:00
Ben Wishovich
81f330e888
feat: add thorough tracing throughout (#908) 2023-04-22 06:47:11 -04:00
Greg Johnston
f3b8d27c4f
change: add window_event_listener_untyped and deprecate window_event_listener pending 0.3.0 (#913) 2023-04-21 14:14:35 -04:00
Greg Johnston
d3a577c365 cargo fmt 2023-04-21 12:45:08 -04:00
Greg Johnston
b80f9e3871
fix: issue with ordering of class attribute and class=("fancy-name-200", true) (closes #907) (#914) 2023-04-21 12:42:35 -04:00
Logan B. Nielsen
d3d2cbed7e
feat: add typed window event listeners (#910) 2023-04-21 11:43:11 -04:00
Daniel Santana
7a5a776cb9
feat: get_untracked for node_ref. (#902) 2023-04-19 20:09:54 -04:00
Greg Johnston
6b825fec37
fix: erroneous non-reactive access warning in undelegated events (#900) 2023-04-19 20:09:05 -04:00
HJin.me
9524c6e289
fix: <For/> rendering error in SSR InOrder/Async Mode (#879) 2023-04-17 10:48:07 -04:00
Greg Johnston
683511f311 clippy 2023-04-11 14:37:54 -04:00
Greg Johnston
f969fd7eff
fix: don't entity-encode HTML special characters inside <script> or <style> (closes #837) (#846) 2023-04-10 13:15:15 -04:00
novacrazy
3c3d3b33f1 Remove unnecessary into 2023-04-07 17:41:27 -05:00
novacrazy
2c2090a194 Return Cow from as_value_string 2023-04-07 05:09:49 -05:00
novacrazy
de9b2998ac More inlining 2023-04-07 05:09:24 -05:00
novacrazy
29b81a3d50 Another round of inlining 2023-04-07 01:44:18 -05:00
novacrazy
5bc0d89ce7 Cleanup Comment::new 2023-04-07 00:52:35 -05:00
novacrazy
342b10c232 Use Cow for ErrorKey 2023-04-07 00:52:23 -05:00
novacrazy
ba9d3c1602 Another round of inlining 2023-04-07 00:52:11 -05:00
novacrazy
de06c9b2ca Fix Box<dyn> casts 2023-04-06 21:52:25 -05:00
novacrazy
84c7d00ea9 Use Cow<'static, str> for Attributes 2023-04-06 21:52:11 -05:00
novacrazy
8f5ae0054d Second round of inlining 2023-04-06 21:39:29 -05:00
Nova
374f0c4e27
Merge branch 'leptos-rs:main' into main 2023-04-06 21:31:41 -05:00
novacrazy
578dd5ef35 Convert bubbles to associated const for more reliable const-eval and dead-code elimination 2023-04-06 20:55:18 -05:00
novacrazy
934a131deb Pull out non-generic code from leptos_dom
Avoids duplicate codegen
2023-04-06 20:52:13 -05:00
Greg Johnston
5d3a360456
fix: correctly escape HTML special characters in text nodes during SSR (#812) 2023-04-06 06:52:59 -04:00
Greg Johnston
fa1013f7c3
chore: fix unused variable warning in property now that it's not memoized (#810) 2023-04-05 13:20:16 -04:00
Marcus Ofenhed
c2ff1cabf1
feat: Add ability to include options to event listeners (#799) 2023-04-04 20:50:35 -04:00
Greg Johnston
7bce4de682
fix: issues with nested <Suspense/> (closes #764) (#781) 2023-04-02 15:57:43 -04:00
Greg Johnston
210c11a733
docs: add runtime "strict mode" checks that warn if you’re non-reactively accessing a value (#786) 2023-04-01 17:41:25 -04:00
Greg Johnston
e78ce7e6b9
feat: create_blocking_resource (#752) 2023-04-01 11:25:00 -04:00
Greg Johnston
1e037ecb60
chore: clippy and docs warnings (#779) 2023-03-31 17:12:42 -04:00
Greg Johnston
1ff56f7bfd
fix: stop memoizing properties in a way that breaks prop:value (closes #768) (#772) 2023-03-30 19:44:38 -04:00
Greg Johnston
f4043cbd9f
fix: escape </script> and other HTML tags in serialized resources (#763) 2023-03-29 13:51:48 -04:00
Igor Shevchenko
98a9ec8335
chore(docs): fix a few typos (#756) 2023-03-27 20:06:34 -04:00
jquesada2016
5329561687
feat: add is_mounted and dyn_classes (#714) 2023-03-27 19:03:59 -04:00
Álvaro Mondéjar
509223ab2e
chore: Upgrade console_log to stable (#724) 2023-03-22 18:21:53 -04:00
Greg Johnston
665b0b8ed2
chore: make wasm-bindgen dependency optional in leptos_reactive (#723) 2023-03-22 17:56:52 -04:00
Greg Johnston
875d2d5a3a chore: handle unbounded_send warnings 2023-03-20 09:33:58 -04:00
Greg Johnston
2faddd85cb
feat: add set_interval_with_handle and deprecate set_interval (#709) 2023-03-19 16:45:22 -04:00
martin frances
ddd463748d
clippy: less .clone() calls, simpler pointer passing. (#707) 2023-03-19 15:30:12 -04:00
Greg Johnston
08c56f7d6c
feat: add a debounce helper for event listeners (#691) 2023-03-19 07:10:56 -04:00
Elliot Waite
e1ba26b62c
feat: add request_animation_frame_with_handle and request_idle_callback_with_handle (#698) 2023-03-18 19:09:36 -04:00
Greg Johnston
309f0bf826
fix: ignore view markers in DynChild hydration (closes issue #697) (#703) 2023-03-18 19:01:56 -04:00
Greg Johnston
1698ffa7db
fix issues in release mode (closes #700) (#701) 2023-03-18 11:04:06 -04:00
Greg Johnston
3bd52fcc9d
fix: hydration errors with <Suspense/> inside components in SSR mode (#688) 2023-03-17 12:46:04 -04:00
Greg Johnston
55f9081465
fix: allow multiple <Suspense/> on same page during in-order or async rendering (#687) 2023-03-17 12:05:36 -04:00
Brett Etter
a8a9c575b5
Added IntoView for ReadSignal and RwSignal in the stable feature. (#677) 2023-03-15 16:40:22 -04:00
Greg Johnston
b8f79a7e56
fix: suppress spurious hydration warnings for tags in leptos_meta (#684) 2023-03-14 14:17:23 -04:00
Greg Johnston
38daaf3b72
chore: apply cargo machete systematically (#671) 2023-03-13 10:16:20 -04:00
Greg Johnston
591212a56a
feat: add fragment support for hot reloading and fix some stuff (#659) 2023-03-11 07:21:37 -05:00
Greg Johnston
c782017578
feat: impl IntoView for &Fragment (#655) 2023-03-10 09:43:03 -05:00
Pikhosh
d291cdb968
fix: show console error instead warning for error! (#654) 2023-03-10 09:42:44 -05:00
ealmloff
29fb1842a5
feat: make server functions work outside of WASM (#643) 2023-03-09 18:03:57 -05:00
Greg Johnston
bb0324fd48
fix: custom events (closes issue #641) (#642) 2023-03-07 14:00:48 -05:00
WafflePersonThing
34aa0e014b
fix: added missing attributes of events that don't bubble (#625)
references used:
- https://developer.mozilla.org/en-US/docs/Web/API/
- web archives of the above before jun 11th 2022, relevant: https://github.com/mdn/content/issues/19590
2023-03-04 11:30:12 -05:00
Greg Johnston
55ce805b60
feat: hot reloading support for cargo-leptos (#592) 2023-03-04 09:04:22 -05:00
Greg Johnston
02e2948e00
fix: suppress warnings caused by resource loading in generate_route_list (closes #582) (#621) 2023-03-03 13:20:38 -05:00
Greg Johnston
c8e6d18139
feat: allow multiple class names in view! macro class = (closes #612) (#614) 2023-03-03 10:44:15 -05:00
Greg Johnston
f46084723a
fix: memory leak in streaming SSR (closes issue #590) (#601) 2023-03-01 20:54:28 -05:00
Greg Johnston
abef12279b fix: don't re-set attributes found in HTML during hydration (closes #597) 2023-02-28 19:56:13 -05:00
Greg Johnston
04eae63e39
examples: include missing examples in CI (#598) 2023-02-28 15:33:02 -05:00
Greg Johnston
1b2a0fe2ad
fix: mouseenter and mouseleave do not bubble (#593) 2023-02-28 09:39:52 -05:00
Greg Johnston
34f7b90177
perf: improvements to event delegation and element creation in <For/> (#579) 2023-02-26 08:31:03 -05:00
Greg Johnston
05b5b25c0e
fixes issue #565 (#566) 2023-02-22 09:20:33 -05:00
Ikko Eltociear Ashimine
a2eaf9b3ee
fix: typo in hydration docs(#552)
identifer -> identifier
2023-02-20 07:09:33 -05:00
Chrislearn Young
4032bfc210
fix: document docs typo (#553) 2023-02-20 07:08:51 -05:00
Greg Johnston
6c31d09eb2
revert PR #538 (#544) 2023-02-18 18:39:08 -05:00
jquesada2016
487dba90d8
fix: off-by-one error in <For/> (closes #533) (#538) 2023-02-18 14:57:14 -05:00
jquesada2016
f2f52b2533
change: move signal method implementations into traits in signal prelude (#490) 2023-02-18 07:30:03 -05:00
Sean Aye
46d6e3f78c
fix compile of leptos dom (#535) 2023-02-17 18:25:58 -05:00
Greg Johnston
586f524015
feature: in-order streaming and async rendering (#496) 2023-02-17 17:31:32 -05:00
Greg Johnston
79781ec20c Fix test import location 2023-02-17 16:18:22 -05:00
Greg Johnston
0071a48b8a
feature: reintroduce limited template-node cloning w/ template macro (#526) 2023-02-16 07:02:01 -05:00
Greg Johnston
00a796d204
change: tweak API of Errors and implement IntoIter (#522) 2023-02-15 14:03:16 -05:00
Greg Johnston
0a534bd7fd
Reexport web-sys event types in leptos::ev to make it easier to type handlers (#521) 2023-02-13 20:45:46 -05:00
martin frances
e732a4952b
leptos_dom erros.rs remove<E>() does not need to be generic. (#516)
* leptos_dom erros.rs remove<E>() does not need to be generic.

* fixed up errors.remove().
2023-02-13 20:25:11 -05:00
Greg Johnston
6dd3be75d1
fix: import in leptos_dom and add Wasm build to CI for regressions (#510) 2023-02-12 18:58:57 -05:00
g-re-g
51e11e756a
Typos and a small cleanup (#509) 2023-02-12 18:11:31 -05:00
Greg Johnston
1dbcfe2861
change: reorganize module exports and reexports (#503) 2023-02-12 17:04:36 -05:00
Greg Johnston
6bab4ad966
apply new formatting everywhere (#502) 2023-02-11 14:30:06 -05:00
jquesada2016
d4648da5c6
chore: add workspace rustfmt.tml (#483) 2023-02-11 14:25:55 -05:00
Greg Johnston
c24874d9c8
change: add Scope to view function in <For/> to avoid memory "leak" (#492) 2023-02-08 20:28:04 -05:00
jquesada2016
765006158a
change: NodeRef<HtmlElement<Div>> generics to NodeRef<Div> (#481) 2023-02-07 20:13:25 -05:00
Jan
b0a98d8b4f
Better styling for router related components (#477) 2023-02-06 18:34:39 -05:00
Greg Johnston
0765e51db8
fix: adding/removing errors from <ErrorBoundary/> (#478) 2023-02-05 21:23:02 -05:00
Jan
c28297fe93
Do it on an other branch (#460) 2023-02-04 07:12:53 -05:00
Greg Johnston
6d0d70cd17
perf: further reduce WASM binary size by ~5-7% (#459)
* Update `leptos_router` docs
* Further reducing WASM bundle sizes
2023-02-03 17:38:44 -05:00
Greg Johnston
6b683f9ab6
fix: leptos_router hydration issues (#450) 2023-02-03 06:50:36 -05:00
Ben Wishovich
160f336303
Update ErrorBoundary to use miette::Diagnostic instead of Error, and various other tweaks (#401)
* Switch RwLock to parking_lot so they are no longer async
* cleanup todo_app_sqlite_axum
* add errors_axum example

---------

Co-authored-by: Indrazar <110272232+Indrazar@users.noreply.github.com>
2023-01-31 21:56:42 -05:00