6 of 6 standards met
This is very WIP. The idea is to refactor scheduling to make it batch-centric — at the moment we have this weird impedance mismatch where effect dirtiness is 'global' (i.e. is a free-floating function, that may or may not push an effect root to the global array, and the effect's dirtiness is a flag on the effect itself), but traversal and flushing happens inside . This is an artifact of how the scheduling logic evolved to accommodate async reactivity, but it turns out to add complexity in various places. The thesis of this work is that if we mark effects _within a batch_, and then only do the walk-upwards-until-we-find-a-root bit when we're about to do the traversal, we will be able to simplify/robustify things a bit without negative performance impacts. We're a ways out from that: the first step is to prevent any cases where an effect is being scheduled outside of a batch, which is easier said than done. Working on it Before submitting the PR, please make sure you do the following [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs [ ] Prefix your PR title with , , , or . [ ] This message body should clearly illustrate what problems it solves. [ ] Ideally, include a test that fails without this PR but passes with it. [ ] If this PR changes code within , add a changeset (). Tests and linting [ ] Run the tests with and lint the project with
Repository: sveltejs/svelte. Description: web development for the rest of us Stars: 85934, Forks: 4785. Primary language: JavaScript. Languages: JavaScript (71.9%), Svelte (22.3%), TypeScript (4.2%), CSS (1.2%), HTML (0.5%). License: MIT. Homepage: https://svelte.dev Topics: compiler, template, ui. Latest release: svelte@5.53.6 (21h ago). Open PRs: 56, open issues: 913. Last activity: 3h ago. Community health: 87%. Top contributors: Rich-Harris, Conduitry, dummdidumm, github-actions[bot], trueadm, tanhauhau, benmccann, paoloricciuti, PuruVJ, baseballyama and others.
JavaScript
Last 12 weeks · 251 commits
Describe the bug IF** snippets have styles, they are ignored and removed/stripped from the build (but on local/dev is fine). Reproduction Make a file that export snippets only, then add styles on these exported snippets, import it in any file/page, build with (or npm), then , no styles will be generated. https://svelte.dev/playground/untitled?version=5.36.4#H4sIAAAAAAAACnWQzU7EIBDHX4WMFzep7R3rxn0G40k8sGVqiHQgMNXdEN7d0K3R-nFj_h_wYzKQnhAkPBJbdmiggdE6TCCfMvA5VK8K0HwmDyG06Q0dV-2oE_6lD54YiRNI6NMQbeC9IsV2Cj6yyOKBbBBFjNFPQkHb1XltK1DUd18lyvcRyWBcStcKbkREo2BXoAHGE4PkOGNp_uH9dvUWeGv8JhaTN7PDBRxPG_CfhFeJbAjIF8TBOx93pfb6IAanU7pTsEDv82KWvgt7RblbezVLfeLz-lwb0YhcT4qPenh9iX4mI-vHb6t6AVji2yU8N8DaundLBuSoXcLyATvzYuXjAQAA App for the IDE. svelte-app.zip System Info Severity annoyance
Describe the problem Summary I’d like to propose adding an improved way to perform component-scoped DOM queries (similar to , but limited to a component’s own DOM subtree). As a long time Ractive user, I got a lot of use out of Ractive’s / methods. Motivation is great for individual elements and allows me to avoid But if you want to query multiple elements inside a component, the typical options are: • Falling back to (which breaks encapsulation) • Manually wiring a root element and calling That last option is probably the best option currently available, but requires some boilerplate in the form of an extra wrapping element which has . Closing Thoughts Not impossible to achieve this as it stands today, it just takes more boilerplate than what I got used to with Ractive's . Thanks Describe the proposed solution I imagine something along the lines of Importance nice to have