Generalizes #8602 from "no font loaded yet" to "nothing laid out yet
this pass": any font, provider, rasterizer or glyph-policy change made
before the first text of a pass takes effect in that pass, since nothing
is laid out with the old fonts.
#8602 missed the case where `default_fonts` is on: an app that installs
its own fonts during its first pass then laid that pass out with the
bundled fonts, and under `MissingGlyphPolicy::Panic` any glyph they lack
(Rerun's ⏎, on a Linux CI box with no system fonts) panics. New
`Fonts::used_since_begin_pass` is what the check reads.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Follow-up to #8581, which gave every `Ui` a role. This adds the name:
`UiBuilder::accessibility_label` sets the label on the `Ui`'s node, and
`Area`, `Popup` and `Tooltip` take an `accessible_name` and pass it on.
A floating container can then be found by name
(`get_by_role_and_label(Role::Dialog, "Options")`) instead of by
reconstructing its node id. Rerun does that reconstruction today for its
modals, toasts and hover tooltips.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
An app built without `default_fonts` starts with no font at all and
installs its own, often from inside its first pass (an `egui_kittest`
harness has no earlier hook).
Fonts used to apply at the start of the *next* pass, so that first pass
laid out every string with an empty family, which since #8601 panics
under `MissingGlyphPolicy::Panic`. Rerun's tests hit this on every
harness.
Nothing laid out before the first font arrives could have used one, so
applying immediately in that case has nothing to keep consistent. With
`default_fonts` on, nothing changes.
Regression test in `egui_kittest/tests/missing_glyphs.rs`.
Written by Claude (an LLM) for @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Adds `Rangef::union`: the smallest range containing both ranges, the
counterpart of `intersection`.
Needed for building min/max envelopes (e.g. audio waveforms) in Rerun,
where we currently spell it out as `Rangef::new(a.min.min(b.min),
a.max.max(b.max))`.
Written with Claude Code (an LLM), reviewed by @emilk.
* [x] I have followed the instructions in the PR template
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
A font family with no font at all used to lay out to an *empty galley*:
the run had no face to shape with, so it was dropped.
`Galley::clamp_cursor` on that empty galley returns 0, so a `TextEdit`
lost its cursor the frame after typing — text stayed, cursor jumped to
0, and e.g. completion popups never opened. Found in rerun's tests after
dropping `default_fonts`, where nothing installed a font for the bare
kittest harness.
### Changes
* epaint: a family without fonts now lays out **one synthetic tofu box
per grapheme cluster**, with metrics derived from the font size.
`glyphs.len() == char_count` and non-zero row heights hold even with no
font.
* epaint: new `MissingGlyphPolicy { Tofu, Panic }` on `Fonts`, consulted
only after every font, `FontProvider` and `GlyphRasterizer` had its
turn. Control characters (`\t`, `\n`, …) never panic, since fonts have
no glyphs for them. The panic names the character, the family and the
installed fonts.
* egui: `Context::set_missing_glyph_policy` / `missing_glyph_policy`.
* egui_kittest: **panics on a missing glyph by default**, since tofu in
a snapshot is easy to miss. Opt out with
`HarnessBuilder::allow_missing_glyphs()`. One demo test needed it (the
emoji completion popup lists emoji the bundled fonts lack).
Top: with fonts, U+10FFFD drawn with Ubuntu's `.notdef`. Bottom: the
same UI with `FontDefinitions::empty()`, all synthetic tofu (3× zoom):
<picture>
<img
src="https://static.rerun.io/tofu_cmp/1c2a567a1f53c301897e716452974a0b6fbc8e12/full.png"
alt="">
<source media="(max-width: 480px)"
srcset="https://static.rerun.io/tofu_cmp/1c2a567a1f53c301897e716452974a0b6fbc8e12/480w.png">
<source media="(max-width: 768px)"
srcset="https://static.rerun.io/tofu_cmp/1c2a567a1f53c301897e716452974a0b6fbc8e12/768w.png">
</picture>
Written by Claude (LLM) together with @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
`Context::add_glyph_rasterizer` appended a rasterizer and requested a
repaint on every call. Calling it from a setup path that runs each frame
piled up duplicates and kept the UI repainting forever (we hit this in
rerun's tests, where `apply_style_and_install_loaders` runs every frame
and the harness never settled).
* `GlyphRasterizer::new` now takes a mandatory `key`: adding a
rasterizer whose key is already installed is a no-op.
* `Context`/`Fonts`/`FontsImpl::add_glyph_rasterizer` only reload fonts,
clear caches and request a repaint when something actually changed.
`Fonts::add_glyph_rasterizer` returns whether it did.
* `SvgGlyph::into_rasterizer` is keyed by cluster, the web canvas
rasterizer by a fixed name.
Written by an LLM (Claude) together with @emilk.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* Stacked on #8581
**⚠️ Breaking ⚠️**
`egui_kittest` that every input widget (button, checkbox, slider, combo
box, text field, …) has an accessible name.
Opt out with `HarnessBuilder::with_accessibility_check(false)`, or run
it by hand with `Harness::check_accessibility`.
Running it over egui's own tests found real gaps, fixed here:
* An empty label (`checkbox(&mut b, "")`) took precedence over
`labelled_by`; now it is not set at all.
* `DragValue` is named after its prefix or suffix (it used to clear the
name).
* The color button has a name, with the color as its value.
* `TextEdit` lost its placeholder on frames where the selection changed.
* `Margin`, `CornerRadius` and the font-size slider name their inputs.
* The demos and kittest tests name their remaining inputs.
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
`WidgetRect::parent_id` used `Ui::id`, the stable id _scope_ shared by
sibling `Ui`s, while accesskit and `WidgetRect::id` use the per-`Ui`
`unique_id`. The `warn_if_rect_changes_id` debug check relies on
`parent_id` changing during a cascading id shift, but cascades propagate
through `unique_id`, not the scope id. So a parent's auto-id shifting
produced a false positive for every widget inside it.
Now `parent_id` is the parent's `unique_id`. Adds a regression test.
Known limitation: the child `Ui`'s own `WidgetRect` still warns in that
case, since its parent's id is genuinely unchanged. The heuristic cannot
tell that apart from a bug.
Found while working on:
* https://github.com/emilk/egui/pull/8542
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* [x] I have followed the instructions in the PR template
Adds `WidgetText::concat(style, parts)`, which joins several `RichText`s
into a single `WidgetText` (backed by a `LayoutJob`).
This is the easy way to get e.g. a label that is partly bold, or a label
with a small colored badge at the end, without manually building a
`LayoutJob` with `RichText::append_to`.
```rust
ui.label(WidgetText::concat(ui.style(), [
RichText::new("Normal, "),
RichText::new("strong, ").strong(),
RichText::new("and small").small(),
]));
```
Extracted from Rerun's `re_ui::egui_ext`.
Written by Claude (LLM).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
A DragValue cannot be held to a width while it is text-edited: the
TextEdit it builds for that state hardcodes clip_text(false), so the
widget grows to fit whatever has been typed and carries its layout with
it. A long entry can stretch a containing popup off-screen. range() does
not help, since it only applies once the edit commits.
clip_text(true) forwards to that TextEdit, so the widget keeps its width
and the text scrolls inside it, following the cursor. Defaults to false,
leaving existing behavior unchanged.
Example on egui.rs:
<img width="1418" height="696" alt="20260917-1900-19 6437910"
src="https://github.com/user-attachments/assets/4bc102ad-24e9-43ae-9e81-91c17a2c2c91"
/>
* Small fix; no corresponding issue created
* [X] I have followed the instructions in the PR template
Found while making the Rerun viewer navigable by accessible name:
floating containers were anonymous `Unknown`/`GenericContainer` nodes at
the root of the tree, and icon-only buttons with a tooltip had no name.
* `Ui`s get an accesskit role from their `UiKind`: panels are `Pane`,
modals and popups `Dialog`, menus `Menu`, tooltips `Tooltip`.
* Popups and tooltips hang under the widget that opened them
(`Area::accessibility_parent`, set through `Popup::anchor_widget`)
instead of floating at the root.
* Combo box popups are `ListBox`.
* `on_hover_text` sets the widget's accessible description, and its name
if it has none.
Drafted with Claude Code (an LLM), tests included.
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Each `use foo::*` at the crate root is now spelled out, so it is obvious
what `egui` re-exports and where each name comes from.
In particular, `cargo doc -p egui` will now show all exported items
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Four `Context` methods dropped the font cache immediately:
```rust
pub fn add_glyph_rasterizer(&self, glyph_rasterizer: GlyphRasterizer) {
self.write(|ctx| {
ctx.glyph_rasterizers.push(glyph_rasterizer);
ctx.fonts = None; // ← even if we are mid-pass
});
}
```
Call any of them from inside a pass and the next text layout panics with
`No fonts available until first call to Context::run()`, or the
tessellator hits `.expect("No fonts loaded")`.
They now set a `reload_fonts` flag that `update_fonts_mut` acts on at
the start of the next pass, which is what `set_fonts` and `add_font`
already do, and each requests a repaint so the change still shows up
promptly.
Found in [Rerun](https://github.com/rerun-io/rerun): our style setup
calls `add_glyph_rasterizer` to draw a couple of glyphs from our own SVG
icons, and every `egui_kittest` test calls that setup inside its
`build_ui` closure. 592 tests on Linux and 590 on macOS died on those
two panics.
The new test fails on `main` with exactly that message and passes here.
* [x] I have followed the instructions in the PR template
Disclosure: this PR was written by Claude (an LLM).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
`update_accesskit_for_text_widget` unconditionally called
`builder.set_role`, so the selectable-label pass overwrote the role a
widget had already reported through its `WidgetInfo`. A `Link` came out
as `Role::Label`, indistinguishable from static text to a screen reader.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
We want to be explicit when constructing `Id`s as `Id::unique`. `AsId`
was the old implicit way. For implicit parameters, use `impl AsIdSalt`
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* Closes#2744.
Adds `RangeSlider`: two handles selecting a sub-range, an editable value
at each end, and the accent fill between them.
Three commits:
**1. Move `Slider`'s geometry, painting and interaction into a private
`slider_core`.** No new `Visuals` field. The one rendering change: the
trailing fill is clamped to the rail, which moves it by under a pixel
for narrow rect handles.
**2. Add `RangeSlider` on top of it.** Rail, handles, hover growth,
`HandleShape` and the fill are the same code `Slider` runs, so the two
do not look different.
** 3. Added per-handle keyboard and screen-reader support. Each handle
is its own focus stop, so Tab reaches either end and the arrow keys move
the focused one. Each handle reports itself to AccessKit bounded by its
neighbour rather than by the end of the rail.
A separate widget rather than a mode on `Slider`, because none of this
means anything with one handle:
- the grabbed handle is remembered for the whole drag, so dragging one
handle past the other does not hand the pointer to its neighbour
- when the handles coincide, the side the pointer is on decides which
one moves
- `min_separation` sets how close they may come
One change: `paint_fill` takes a `Rangef` instead of a handle centre.
API changes from the review follow-ups:
- `Slider::prefix`/`suffix` take `impl IntoAtoms`, like `DragValue`, so
images and styled text work. Plain `char` or number arguments no longer
do.
- A prefix goes in front of any prefix already set, and a suffix after
any suffix already set, on `DragValue`, `Slider`, `RangeSlider`, and
`TextEdit`. `Slider` and `TextEdit` used to replace.
- `ValueFormat`, `SliderSpec`, and `DragValueSettings` are public, with
`format()`, `spec()`, and `drag_value()` builders on both sliders.
- `DragValue::atoms()` returns `Atoms` by value.
Snapshots: the new gallery row changes `widget_gallery_*` and
`demos/Scene` (the Scene demo embeds a Widget Gallery). `RangeSlider` is
also added to `test_widgets.rs`, which adds two new snapshots.
Written with Claude (llm), I (gavrelina) have reviewed the code myself
(I did!).
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Remove `default_fonts` from the list of default features of `egui` and
`epaint`, but keep it for `eframe`.
This is so that 3rd party egui crates don't accidentally force the
`default_fonts` feature on all upstream users.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
`with_salt_matches_with` and `with_one_child` built the same `Id` by
different routes.
The debug source map keeps the first spelling it sees for an `Id` and
ignores later ones, so whichever test ran first decided what the other
one's `{:?}` printed — and the test order is not fixed.
Giving `with_salt_matches_with` sources of its own removes the shared
entry.
Surfaced by the red `Run tests` on #8571, which does not touch `id.rs`.
It reproduces on `main`: running just the two tests together, 10 of 15
runs failed before this change, and 12 runs of the whole module after it
failed none.
🤖 This PR was opened by a coding agent (Claude Opus 5).
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
An inspection request is served from a frame, and a minimized or
occluded window runs none: eframe skips the whole pass, and wgpu hands
out no surface texture. An inspector attached to a backgrounded app
could only time out.
* `ViewportCommand::RequestPaintWhileHidden` asks for a painted frame
from a hidden window. It rides the command channel, which already
reaches the integration while hidden (`run_logic` hands it the pending
commands), so `Context` needs nothing new.
* eframe paints when a pending action wants paint: that command, or a
screenshot, which asks for the same thing.
* egui-wgpu captures without a surface texture: the capture renders to
its own texture anyway, and only the present needs the surface. Pending
screenshot callbacks used to be dropped silently whenever the frame
could not be acquired, which also hit visible-but-occluded windows.
`egui_inspection` sends the command, so nothing raises or focuses the
window.
Repro and manual test: `cargo run -p test_inspection_hidden_window`.
Verified on macOS: screenshots and trees are served while the window is
minimized.
Replaces:
* https://github.com/emilk/egui/pull/8566
* [x] I have followed the instructions in the PR template
Written by Claude (LLM).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
`Ui::id` was easy to confuse with `Ui::unique_id`. It is the id of the
_scope_ the `Ui` belongs to: stable across frames, shared by sibling
`Ui`s, and the base for widget state ids. `Ui::unique_id` is unique per
`Ui` but unstable.
This renames `Ui::id` to `Ui::scope_id` (old name deprecated) and
rewrites both docstrings to say so.
Follow-up to discussion in:
* https://github.com/emilk/egui/pull/8534#discussion_r3969041538
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Adds a setting on wheter the cursor should be rendered or not.
Fixes the recording feature potentially rendering frames of the same
pass multiple times, which is unexpected during normal (non-test)
execution and might cause crashes in custom rendering callbacks.
* Closes <https://github.com/emilk/egui/issues/8415>
* [x] I have followed the instructions in the PR template
Adds `Context::root_ui` to access the root `Ui` of the current pass from
anywhere, and `Context::run_pass` (like `run_ui`, but the callback gets
`&Context`). The root `Ui` is stored in the viewport state during the
pass and created on demand, so `root_ui` also works with
`begin_pass`/`end_pass`.
This lets integrations like `bevy_egui`, where ui code is spread over
many systems sharing only a `Context`, add panels again:
```rust
ctx.root_ui(|ui| {
egui::Panel::left("left").show(ui, |ui| { /* … */ });
});
```
Panels added this way share one root `Ui`, so they stack correctly and
`Context::is_pointer_over_egui` stays correct. Calling `root_ui` while
the root `Ui` is already borrowed (e.g. inside the `run_ui` callback)
panics with a clear message.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
`AtomLayout` kinda combined two seperate concerns, this logically
seperates them.
Also makes nested atoms a lot more lightweight, not requiring a
`Response`.
New widget `egui::CompletionPopup`: a code completion popup over a
`TextEdit`. ↑/↓ selects, Enter or Tab accepts, Escape closes, click
accepts. Keyboard focus never leaves the text field. The caller supplies
suggestions for the word under the cursor:
```rust
CompletionPopup::new(id).show(ui, TextEdit::singleline(&mut text), |query| suggest(query));
```
New example `code_completion` shows slash-command completion, with
headless `egui_kittest` tests for the arrow/Enter/Tab/Escape behavior,
including a multiline chat composer.
Builds on:
* https://github.com/emilk/egui/pull/8530
Note on Escape: egui surrenders focus on Escape in `Memory::begin_pass`,
before any widget runs. So an app that wants "Escape does X while the
text field is focused" must set `TextEdit::event_filter(EventFilter {
escape: true, .. })`, or the handler never sees the field focused. The
popup does this for you while it is open.

* Related: <https://github.com/emilk/egui/issues/122>
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
`GlyphRasterizer` now has a `FontPriority`:
* `FontPriority::Highest`: asked about every cluster, before any font.
Use it to override how specific glyphs looks
* `FontPriority::Lowest` (default): a fallback, only asked about
clusters no installed font (or `FontProvider`) has. Same as before.
Several rasterizers can be installed; within a tier they are asked in
order, and the first `Some` wins.
```rust
ctx.add_glyph_rasterizer(
egui::GlyphRasterizer::new(|request| (request.cluster == "…").then(|| my_ellipsis(request)))
.with_priority(egui::FontPriority::Highest),
);
```
API changes (all unreleased): `Context::set_glyph_rasterizer(Option)` →
`add_glyph_rasterizer` / `set_glyph_rasterizers(Vec)`, same on
`epaint::Fonts`.
Follow-up to:
* https://github.com/emilk/egui/pull/8512
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* [x] I have followed the instructions in the PR template
The response of a container (e.g. from `Ui::response` or
`ui.scope(…).response`) is not `hovered()` or `clicked()` when a child
widget is under the pointer, since the child covers the container.
This adds methods that treat the container and its children as one:
* `Response::container_contains_pointer`
* `Response::container_hovered`
* `Response::container_clicked`
* `Response::container_secondary_clicked`
* `Response::container_context_menu`
Useful for e.g. highlighting a table row that holds buttons, or showing
a context menu for a whole row.
Extracted from Rerun's `re_ui::egui_ext`, where it has been in use for a
while.
Written by Claude (LLM).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Eguis built in widgets should work right even if there are no
default/system fonts. This renders the submenubutton triangle with
epaint so it will always look right and isn't system-font dependent.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
`Id::new` and `From<&str> for Id` etc are foot-guns: they hide the fact
that an `Id` MUST be globally unique (well, at least unique within your
app).
So this PR removes both and replaces them with `Id::unique`, which is
very explicit.
In places where non-uniqueness is desired, you can use `IdSalt`, which
has the convenient `From<&str>`.
Most changes are in tests.
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
Migration guide for the changelog:
`ViewportCommand::Screenshot` was changed to be callback based.
Previously you needed to iter the input events to check for the
screenshot (but didn't need interior mutability):
```rs
[derive(Default)]
struct MyApp {
screenshot: Option<Arc<egui::ColorImage>>,
}
impl eframe::App for MyApp {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
if ui.button("Screenshot").clicked() {
ui.send_viewport_cmd(ViewportCommand::Screenshot(UserData::default()));
}
let image = ui.input(|i| {
i.events
.iter()
.filter_map(|e| {
if let egui::Event::Screenshot { image, .. } = e {
Some(Arc::clone(image))
} else {
None
}
})
.next_back()
});
if let Some(image) = image {
self.screenshot = Some(image);
}
}
}
```
Now you need to use a mutex, channel, or some other sync primitive to
get the result:
```rs
#[derive(Default)]
struct MyApp {
screenshot: Arc<Mutex<Option<Arc<egui::ColorImage>>>>,
}
impl eframe::App for MyApp {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
if ui.button("Screenshot").clicked() {
let ctx = ui.ctx().clone();
let screenshot_mutex = self.screenshot.clone();
ui.request_screenshot(move |screenshot| {
screenshot_mutex.lock().replace(screenshot);
ctx.request_repaint();
});
}
}
}
```
----
This implements a callback-based screenshot api for egui
Upsides over `ViewportCommand::Screenshot`:
- More convenient api: `ctx.request_screenshot(|screnshot| ...)` (and no
need to downcast UserData)
- Reading screenshot data doesn't require rendering another frame
- Should allow us to add recording as a plugin without special hooks in
egui_kittest (otherwise capturing the last frame would have required
custom hooks in kittest)
- This was also a problem in
[kittest_inspector](https://github.com/rerun-io/kittest_inspector): When
streaming a real app, the frame seen was always a couple frames behind
when the app was idle
Lets you control which keys a `TextEdit` captures while it has focus,
instead of letting egui use them for focus navigation. Needed e.g. for a
completion popup, where Tab and Escape should act on the popup rather
than move focus away.
Split out from:
* https://github.com/emilk/egui/pull/8529
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Allows one to do custom painting in places where reading the
`AtomLayoutResponse` may be hard or impossible.
Also very useful when combined with `AtomKind::Closure`
Closes#8478.
Editing the alpha `DragValue` rebuilt the full HSVA color from the
displayed RGBA values, which could re-quantize RGB. This tracks RGB and
alpha edits separately so alpha-only edits preserve RGB.
Adds regression coverage for gamma-byte and linear numeric color spaces.
- [x] I have followed the instructions in the PR template
Disclosure - AI written PR with GPT 6
I was unable to compile for wasm on my project because I use egui-winnit
instead of eframe
See AI explanation below:
## Summary
* Fixes#8436
`egui-winit` unconditionally compiled `NativeFile`, which implements
`DroppedFile::bytes()`. On wasm32, the trait requires `bytes_async()`
instead, causing compilation to fail.
This change gates the native file implementation and its usage to native
targets. An explicit wasm fallback ignores dropped-file events, which
winit’s web backend does not emit.
Adds a direct wasm compilation check to CI and the local check script,
since eframe’s wasm builds do not compile egui-winit.
## Validation
- wasm32 compilation with default features disabled passes.
- Native Linux/X11 compilation passes.
- Formatting and shell syntax checks pass.
- Strict wasm Clippy encounters six existing, unrelated warnings in
clipboard.rs.