Commit Graph
63 Commits
Author SHA1 Message Date
Jonathan Kelley 343c48f5ad fix: viewBox translation by not accidentally stringifying literals (#3527)
* fix: don't double stringify lits

* also split off namespaces in translation
2025-01-08 16:12:48 -08:00
Jonathan Kelley 463e67cd12 Improve compile times by splitting out rsx-hotreload from rsx (#2971)
* fix imports, migrate over rsx-hotreload
2024-09-16 17:35:05 -07:00
Chung b20db13e84 add disabled, form and name attributes to fieldset (#2947) 2024-09-10 15:21:58 -05:00
Tristan F.andJonathan Kelley 9167cd9dec fix most typos, add crate-ci/typos to CI (#2653)
* fix most typos, add crate-ci/typos to CI

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-07-23 17:49:33 -07:00
Evan Almloff 176e67e5b7 switch to a Document trait and introduce Script/Head/Style/Meta components (#2635)
* switch to a Document trait and introduce Script/Head/Style/Meta components

* Fix desktop title

* Insert special elements into the head during the inital SSR render

* Make all head component attributes optional

* hydrate head elements

* improve the server streaming head warning

* Document fullstack head hydration approach

* deduplicate head elements by href

* move Link into head::Link

* document head components

* add meta and title examples

* Fix a few doc examples

* fix formatting

* Add title to playwright tests

* serde is optional on web, but it is enabled by hydrate

* remove leftover console log
2024-07-17 20:54:03 -05:00
Jonathan Kelley 47ab4c8db9 Chore: move todo!() to unimplemented!() (#2558) 2024-06-27 16:27:27 -05:00
nayo0513andnayo0513 689ac5433f add popover api (#2498)
Co-authored-by: nayo0513 <nayo05130513@gmail.com>
2024-06-10 07:23:12 -05:00
igor ae95e74b80 fix: Add missing name attribute for <slot> (#2494)
Fix #2493
2024-06-10 07:21:16 -05:00
Evan Almloff 0127501dbf Improve inline docs (#2460)
Improve inline docs

* improve incorrect event handler return error message

* Improve event handler docs

* document the eval functions

* document spawn and common spawn errors

* fix event handler docs

* add notes about how you use attributes and elements in rsx

* add doc aliases for attributes and events we rename

* add some more aliases for common search terms

* don't doc ignore any public examples in core

* don't ignore public doc examples in ssr

* don't ignore examples in the dioxus package readme

* add a warning when you launch without a renderer enabled

* fix some outdated element docs

* add a bunch of examples to resource

* add notes about desktop events

* add more docs for use_resource

* add on_unimplemented hint to Dependency

* fix some unresolved links

* add examples to each of the router traits

* add not implemented errors for router traits

* add an example to the routable trait

* expand rsx macro docs

* improve memo docs

* update the dioxus readme

* mention dioxus crate features in the docs

* fix a bunch of doc tests

* fix html doc tests

* fix router doc tests

* fix dioxus signals doc tests

* fix dioxus ssr doc tests

* fix use_future example in the hooks cheat sheet

* add a javascript alias for eval

* fix hook explanation values

* remove unused embed-doc-image dependency
2024-06-06 18:15:17 -07:00
Evan AlmloffandJonathan Kelley 2523581cf4 Autocomplete rsx (#2421)
* autocomplete rsx

* hide the completions module

* fix autocomplete for identifiers that start with a raw identifier

* add field completion hints for props

* remove extra import

* Revert "add field completion hints for props"

This reverts commit 194899c73783e0f9b5d601d53365746d838f2048.

* fix autocomplete inside raw expressions

* fix autofmt

* feat: just use regular ifmt if it's compatible

reuses the tokens for ifmt so RA provides its HIR lowering on simple formatted strings

* fix merging ifmt strings

* add a better error message for components called like functions

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-05-22 07:24:50 -05:00
Evan Almloff f7209e123f restore the docs for the image element 2024-02-27 10:36:45 -06:00
Florian de Gaulejac 5dad13ac74 Restore image element under svg element 2024-02-27 09:18:18 +01:00
Ameyanagi a3f6d21bea deleted unused comment 2024-01-18 17:55:15 -05:00
Ameyanagi 27254eecc6 added annotation-xml 2024-01-18 17:13:55 -05:00
Ameyanagi f8071d9a61 add MathML core elements 2024-01-18 01:54:23 -05:00
Evan Almloff e5df83ceec Merge branch 'master' into pr/atty303/1349 2024-01-06 08:52:37 -06:00
Evan Almloff 682beeccfd fallback to global attributes when mapping rsx rosetta html attribute names 2024-01-03 15:45:19 -06:00
Evan Almloff afb258b658 Fix elements and attributes mapping for dx translate 2024-01-03 15:18:27 -06:00
Alex Parrill 6b7545f60a Add loading attribute to img element (#1699)
Useful for lazy loading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading
2023-12-07 16:13:50 -06:00
Evan Almloff 141554a786 remove logging 2023-11-26 09:23:27 -06:00
Evan Almloff 1c0b33cef4 fix hot reloading svg elements 2023-11-26 09:21:27 -06:00
Evan Almloff 77d53df532 Merge branch 'master' into pr/atty303/1349 2023-10-31 13:39:20 -05:00
Oak f3a749538b feat: initial_checked attribute for inputs (#1540)
Mapped to defaultChecked property of HTMLInputElement.
2023-10-12 08:12:09 -05:00
Oak 5bcb772511 feat: initial_selected attribute for options (#1508) 2023-10-02 14:08:09 -05:00
Evan Almloff ee25c03e74 fix some clippy lints 2023-09-27 10:13:45 -05:00
Evan Almloff b60671e0fe fix non extending attributes 2023-09-27 10:02:49 -05:00
Evan Almloff 7033276c34 Merge branch 'master' into pr/atty303/1349 2023-09-20 16:19:23 -05:00
Evan Almloff dc446b5e5b fix extending an element 2023-09-19 16:38:27 -05:00
Valentin Golev e8ea228759 add initial_value to textarea (#1434) 2023-09-06 12:49:29 -05:00
Koji AGAWA d573f5dfd5 feat: props spread 2023-08-13 16:45:17 +09:00
Christian Albrecht c9790860a5 fixed "http_equiv" in meta to generate "http-equiv" instead of "http_equiv" (#1277) 2023-08-02 11:25:41 -05:00
Kaid 277436f673 Changed underlying directory attribute to webkitdirectory, fixed attribute parsing to properly toggle it. 2023-06-06 08:06:27 +08:00
Kaid 37a8fb5391 Add directory support for file input. 2023-06-05 16:47:04 +08:00
Miles Murgaw d09c92beda Add initial_value attribute & fix static special attribute handling (#1063)
* feat & fix: initial_value attribute, special attribute handling

* revision: rename js file

* fix: rustfmt

* fix: clippy

* fix: desktop not finding common.js

* fix: desktop failing to render

Missed a single ``this.SetAttributeInner`` as it was now ``setAttributeInner``
Javascript didn't even throw any errors about this smh

* revision: no need for match statement
2023-06-04 11:29:34 -05:00
Evan Almloff 633eae2d5c add use element to html 2023-05-15 14:39:32 -05:00
Alexander Keliris 35cb6616af Add hgroup html tag (#1016)
The [<hgroup>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup) HTML element represents a heading and related content. It groups a single <h1>–<h6> element with one or more <p>.
2023-05-10 08:21:05 -05:00
Evan Almloff d8d483a8b4 apply the same fixes to element specific attributes 2023-01-12 11:31:21 -06:00
Maurice Kayser dde4fb31b2 Fix typo (#709) 2023-01-03 10:09:03 -06:00
Evan Almloff a42ed7d445 create hot-reload-context flag 2022-12-23 15:08:44 -06:00
Evan Almloff 776c5e8839 fix hot reloading with global and svg attibutes 2022-12-22 13:52:41 -06:00
Evan Almloff 4364a4b511 handle updating templates better 2022-12-19 19:28:44 -06:00
= ab743e01b7 make html hot reloding context work 2022-12-14 21:38:50 -06:00
= 6d2e510200 WIP implement hot reloading context for html 2022-12-12 21:46:49 -06:00
= c961bf0779 improve and unify element macro 2022-12-11 10:26:21 -06:00
Jonathan Kelley 0dad91bc08 wip: pass more events 2022-11-15 16:37:23 -08:00
Jonathan Kelley 90982e0ccb wip: start to refactor out hot reloading from packages
Also implement alternative simpler template system
2022-10-20 09:56:09 -07:00
Daniel Olano b51abd1a9c Add datetime attribute to time element (#590) 2022-10-14 10:16:52 -05:00
Demonthos 047ed1e553 Subtree memorization / reactive templates (#488)
This commit adds subtree memoization to Dioxus.

Subtree memoization is basically a compile-time step that drastically 
reduces the amount of work the diffing engine needs to do at runtime by
extracting non-changing nodes out into a static "template." Templates 
are then understood by the various renderers in the ecosystem as a 
faster way of rendering the same items. 

For example, in the web, templates are simply a set of DOM Nodes created 
once and then cloned later. This is the same pattern frameworks like Lithtml
and SolidJS use to achieve near-perfect performance. 

Subtree memoization adds an additional level of complexity to Dioxus. The RSX
macro needs to be much smarter to identify changing/nonchanging nodes and
generate a mapping between the Template and its runtime counterparts.

This commit represents a working starter point for this work, adding support 
for templates for the web, desktop, liveview, ssr, and native-core renderers.
In the future we will try to shrink code generation, generally improve 
performance, and simplify our implementation.
2022-09-30 12:03:06 -07:00
Norman Paniagua 8347de5956 Added dialog tag (#533)
* added dialog tag

* updated attribute type
2022-08-24 08:01:40 -05:00
Jon Kelley d9546d9504 Renderers are now packages, not features. (#387)
* feat: use synchronous router design

* feat: function to get router out of dom

* chore: restructure workspace to use renderers as packages, not features
2022-07-09 15:15:20 -04:00