Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Important updates #2

Merged
merged 66 commits into from
Jan 2, 2025
Merged

Important updates #2

merged 66 commits into from
Jan 2, 2025

Conversation

MAVRICK-1
Copy link
Member

Related

What

emilk and others added 30 commits December 16, 2024 09:51
### Related
* Part of #8454 (but not a
complete fix)
* Part of #8264 (will try to
implement later)
…ng (and use it in the air traffic data example) (#8458)

### What

It's some time nice to log some color information in multiple entities
to make it easier to relate them visually. This PR adds a
`rr.components.Color.from_str()` utility that does exactly that:
generate a nice color randomly picked up based on the provided string.

This PR also updates the air traffic data example so the barometric
traces have matching colors with the map data.

---------

Co-authored-by: Clement Rey <[email protected]>
#8468)

### Related

<!--
Include links to any related issues/PRs in a bulleted list, for example:
* Closes #1234
* Part of #1337
-->

CI is failing on `nightly`:
https://github.com/rerun-io/rerun/actions/runs/12335447188/job/34427482723

### What

Seems to be a mismatch between doc strings.

<!--
Make sure the PR title and labels are set to maximize their usefulness
for the CHANGELOG,
and our `git log`.

If you have noticed any breaking changes, include them in the migration
guide.

We track various metrics at <https://build.rerun.io>.

For maintainers:
* To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
* To deploy documentation changes immediately after merging this PR, add
the `deploy docs` label.
-->
## Related

* Closes #8454 

UI interaction was sometimes broken outside of graph views. This PR is
the cure.

* Reverts #8416

---------

Co-authored-by: Jochen Görtler <[email protected]>
### What

@emilk and I discussed level-of-details on the graph. Here is an initial
experiment.

Overall, I'm not sure the performance improvements warrant this
addition.

Discussion + video:
https://rerunio.slack.com/archives/C041NHU952S/p1734084741247629

<!--
Make sure the PR title and labels are set to maximize their usefulness
for the CHANGELOG,
and our `git log`.

If you have noticed any breaking changes, include them in the migration
guide.

We track various metrics at <https://build.rerun.io>.

For maintainers:
* To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
* To deploy documentation changes immediately after merging this PR, add
the `deploy docs` label.
-->

---------

Co-authored-by: Antoine Beyeler <[email protected]>
…8473)

Wasn't exposed in earlier wgpu versions.
Usually not a problem, but when it is it's usually too late ;)
### Related

<!--
Include links to any related issues/PRs in a bulleted list, for example:
* Closes #1234
* Part of #1337
-->

* Closes #8437
* Closes #8442

### What

This implements:
* Single-click on empty space to select view.
* Double-click on node to select entire entity.

Merging @emilk's recent changes (#8469 and #8457) seems to have fixed
the flickering on selection too.
### Related
* Closes #8263

### What
I couldn't stand the half-second delay when opening the options screen.
Rerun needs to feel snappy!

Gettings the ffmpeg version is now done on a background thread, showing
s spinner until it is done.

Unfortunately we still have to wait for ffmpeg when starting up an H.264
video on native. We could fix that by pre-warming the cache though 🤔

---------

Co-authored-by: Clement Rey <[email protected]>
Co-authored-by: Andreas Reich <[email protected]>
### What

This is not perfect, since Sorbet hasn't been formalized.

This decodes the place-holder sorbet data we currently use in our query
results, as well as some of the Rerun-chunk metadata.

Eventually we should move this onto the rust-side of things, but as this
is largely just metadata processing, doing it in python is not terrible.
…t invalid transforms (#8459)

### Related

* Fixes #7868

### What

See title. In detail:
* `RotationAxisAngle` will no longer be ignored when axis is
non-normalizable
* deprecation of `DisconnectedSpace`
   * slight fixes to codegen for handling this smoothly
* lots of doc updates
* wherever we had constants for identity, we now also have one for
invalid
* python didn't have any at all so far, but I didn't want to add this in
this iteration since generally constants there are a bit tricky
    * we should have more of those generally

---------

Co-authored-by: Jeremy Leibs <[email protected]>
…8369)

### Related

* Fixes #8330

### What

Wasn't able to repro the issue in the first place though - tried
fractional zoom and a contrast heavy background to no avail
* [x] confirm this fixes it

---------

Co-authored-by: Antoine Beyeler <[email protected]>
…/Show all` item (#8493)

### What

☝🏻 title. Formatting glitches were introduced in the "space view rename"
### Related

<!--
Include links to any related issues/PRs in a bulleted list, for example:
* Closes #1234
* Part of #1337
-->

* Closes #8479
* Closes #5138

### What

This adds missing view interactions the following views:

* Map view
* Graph view
* TextDocument view

@Wumpf @abey79 I feel like the pattern repeats itself and it's easy to
miss when writing new views. So I wonder if this could be unified. I see
several options for this:

* repurpose `handle_select_hover_drag_interactions` which only seems to
be used for `DataResult` right now
* Making each view return a `Result<(Response,
ViewSystemExecutionError>` (instead of `()`) and handling it outside of
the view.
* Creating a function analogous to
`handle_select_hover_drag_interactions`.

<!--
Make sure the PR title and labels are set to maximize their usefulness
for the CHANGELOG,
and our `git log`.

If you have noticed any breaking changes, include them in the migration
guide.

We track various metrics at <https://build.rerun.io>.

For maintainers:
* To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
* To deploy documentation changes immediately after merging this PR, add
the `deploy docs` label.
-->
### Related
* Part of #8264
* Using emilk/egui#5438

Still missing: copy screenshot to clipboard

Also fixes a crash when screenshotting graph views.

### Usage

![image](https://github.com/user-attachments/assets/88948342-8279-4bf6-9bc6-13722229dc44)

### Result
![Node-link
diagram](https://github.com/user-attachments/assets/b2ff8dd5-ae55-436a-9cd2-263eeb72a0df)
### What

Title.

This was a small part of @gavrelina's feedback.


<!--
Make sure the PR title and labels are set to maximize their usefulness
for the CHANGELOG,
and our `git log`.

If you have noticed any breaking changes, include them in the migration
guide.

We track various metrics at <https://build.rerun.io>.

For maintainers:
* To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
* To deploy documentation changes immediately after merging this PR, add
the `deploy docs` label.
-->
…rly error on unsupported render targets (#8476)

### Related

* Fixes #8466
* Related to #8475


### What

Improved & sharpend overall how we handle device tiers. Next steps that
went too far in scope right now detailed in
* #8475


### Testing

this shouldn't be all that problematic, but just in case let's be
thorough:

* [x] WebGL
* [x] WebGPU
* [x] Mac Metal
* [x] Windows Vulkan
* [x] Windows OpenGL
* [ ] Linux Vulkan
* [ ] Linux OpengL
…ead (#8467)

### What

We have a foot-gun in our code: our file dialogs (via `rfd`) [are only
allowed to be run from the main thread (at least on
Mac)](https://docs.rs/rfd/latest/rfd/#macos-non-windowed-applications-async-and-threading).
However, there is nothing stopping a user from accidentally calling
these functions from a background thread, and if you test it on e.g.
Linux, it may very well work.

So this PR introduces a new crate `re_capabilities` and a new type
`MainThreadToken`. Any function that uses `rfd` should require the
`MainThreadToken` as an argument. The `MainThreadToken` is only allowed
to be created in `fn main`, and since it is neither `Send` nor `Sync`,
this guarantees at compile-time that any functions that take a
`MainThreadToken` can only be called from the main thread.

NOTE: I have no way to enforce that all uses of `rfd` also require
`MainThreadToken` - we need to remember this ourselves, but I've made
sure that all our _current_ uses of `rfd` require a `MainThreadToken`.
There are too many pitfalls that users can fall into because the current
logging APIs are not designed with tagging in mind, and we have not yet
communicated at all about any of this.

This has to be done below the chunk level, directly at the descriptor
level.
…n existing view in the viewport (#8431)

### Related

* Closes #8266
* Related to #8267 

### What

This PR makes it possible to drag one or more entities from the
blueprint and streams tree to existing views in the viewport. This
involves introducing and/or adjusting a whole bunch of semantics around
selection and dragging.

#### `DragAndDropFeedback`

This PR introduced the notion of drag-and-drop feedback from the hovered
ui element.

Feedback may be either of:
- **Ignore** (default): hovered element is uninterested in the type of
drag payload, or in any payload at all, or is outright oblivious to all
that drag-and-drop stuff.
- **Reject**: hovered element is compatible with the _type_ of drag
payload, but not its actual _content_. For example, a view might already
contains the dragged entities.
- **Accept**: hovered element is compatible with both the type and the
content of the payload.

A drop should only ever happen in the latter case.

#### Payload visualisation

The payload pill display is now adjusted based on the feedback, both its
opacity (ranging from 50 to 80%) and its colour (grey or blue). The
mouse cursor is also adjusted based on the feedback.


#### Drop container visualisation

This PR slightly adjust the look of the drop container visualisation:
the blue frame is now 2px wide.

Note that the drop container is _not_ necessarily the thing that's
hovered by the mouse, see e.g. containers in the blueprint.


#### Selection handling during drag-and-drop

This PR slightly alter the current behaviour. Now:

- dragging a selected item drags the entire selection
- dragging an unselected item with `cmd` held adds that item to the
selection, and drags the entire selection
- dragging an unselected item drags that item, _without changing the
selection_ (new)


#### Entity-to-viewport-view drag semantics

This is the original goal of this PR.

- An existing view will accept a payload containing entities **IFF** any
of these entities—or their children—is both visualisable and not already
contained in that view.
- An existing view will reject a payload containing entities **IFF** all
of these entities are either non-visualisable or already contained.
- An existing view will ignore a payload containing anything else.
- When a drop succeeds:
- The view will add an inclusive ("…/**") rule for each of the dropped
entities that are both visualisable and not already included.
  - The view becomes selected.

Emphasis on that last point. This subtle UX behaviour (courtesy of
@gavrelina) makes the drop success and impact on the entity path filter
more explicit.


#### Theory of operation for drag-and-drop

With this PR, a "framework" slowly starts to emerge. For now, it's
mainly this bit of documentation:

```rust
//! ## Theory of operation
//!
//! ### Setup
//!
//! A [`DragAndDropManager`] should be created at the start of the frame and made available to the
//! entire UI code.
//!
//!
//! ### Initiating a drag
//!
//! Any UI representation of an [`crate::Item`] may initiate a drag.
//! [`crate::ViewerContext::handle_select_hover_drag_interactions`] will handle that automatically
//! when passed `true` for its `draggable` argument.
//!
//!
//! ### Reacting to a drag and accepting a drop
//!
//! This part of the process is more involved and typically includes the following steps:
//!
//! 1. When hovered, the receiving UI element should check for a compatible payload using
//!    [`egui::DragAndDrop::payload`] and matching one or more variants of the returned
//!    [`DragAndDropPayload`], if any.
//!
//! 2. If an acceptable payload type is being dragged, the UI element should provide appropriate
//!    visual feedback. This includes:
//!    - Calling [`DragAndDropManager::set_feedback`] with the appropriate feedback.
//!    - Drawing a frame around the target container with
//!      [`re_ui::DesignToken::drop_target_container_stroke`].
//!    - Optionally provide more feedback, e.g., where exactly the payload will be inserted within
//!      the container.
//!
//! 3. If the mouse is released (using [`egui::PointerState::any_released`]), the payload must be
//!    actually transferred to the container and [`egui::DragAndDrop::clear_payload`] must be
//!    called.
```

### TODO

- [x] release checklist to check the above semantics


https://github.com/user-attachments/assets/047c0d41-fead-424a-b673-b6cb1479d1fa
### What

This PR builds proper scrollability to our modals, thereby fixing:
- an ugly glitch with large add/remove entity modal
- add view/container modal not scrollable with very small viewer window
size


#### Before

<img width="625" alt="image"
src="https://github.com/user-attachments/assets/cfe3d0cb-ac10-4bf5-84cb-4766589c5b41"
/>


#### After

<img width="641" alt="image"
src="https://github.com/user-attachments/assets/919cb62b-4934-429b-a41c-025f7c0cd9a9"
/>

<img width="951" alt="image"
src="https://github.com/user-attachments/assets/e8eec505-a789-4285-b2c5-0c4906660fff"
/>

---------

Co-authored-by: Clement Rey <[email protected]>
Make sure we test everything that went into 0.30.0, while we wait for
* lampsitter/egui_commonmark#69
* no hover at all
* no highlight on non-text box nodes
### Related

* Closes #8503.

### What

This fixes setting the fallback value in the selection panel.

It also deals with geometry that can't be drawn in a meaningful way
because of that.

<!--
Make sure the PR title and labels are set to maximize their usefulness
for the CHANGELOG,
and our `git log`.

If you have noticed any breaking changes, include them in the migration
guide.

We track various metrics at <https://build.rerun.io>.

For maintainers:
* To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
* To deploy documentation changes immediately after merging this PR, add
the `deploy docs` label.
-->
* Closes #8494

Removes the highlighted rectangle around views that are hovered or
selected.
Why? Because we already have the tab title for this.

Keeps it for containers, because they have no tab title.



https://github.com/user-attachments/assets/bb407161-f3a8-4c66-bbd9-816f8dd28561
jleibs and others added 28 commits December 18, 2024 08:20
This allows the update APIs to now support multi-recording updates, and
generally gives users more direct control over things like the column
metadata, etc.
### Related

* #7026

### What

Lots of considerations & (soft) implications in this hack, see comment.

The important outcome here is that node hover now looks like this:

![image](https://github.com/user-attachments/assets/5f4e693b-19cf-4ac5-b359-1354dd8377e9)
node selection:

![image](https://github.com/user-attachments/assets/be75a273-bcb6-4bd4-b90a-5a19c994eb0f)
and node entity selection (note that edges are still around:

![image](https://github.com/user-attachments/assets/e76c7cf9-3a1b-4687-bc61-10c6ace02103)
also you can still browse the edges:

![image](https://github.com/user-attachments/assets/90c5d116-e9fe-4e4f-8032-ce8687e80097)
### Related

* Related to #8518
* Related to #8431

### What

Fix a bug in #8431 where multi-entity drag-and-drop would only add a
single entity due to a foot-gun in our entity path filter mutation API
(see #8518 for more). Also add a new checklist.
The warning:

```
warning: /Users/hhip/src/rerun/crates/utils/re_capabilities/Cargo.toml: `default-features` is ignored for egui, since `default-features` was not specified for `workspace.dependencies.egui`, this could become a hard error in the future
```
This is a band-aid patch to address an issue with entity path filter
which would result in the following behaviours:

- the entity path filter would be perma-writen to the blueprint store
when the view is selected (in some cases)
- in such cases, this would break undo on user change (aka with entity
drag-and-drop)

The core issue is deeper and might cause panics with rust 1.81+. The
TL;DR is that the current `EntityPathFilter` type is ambiguous as to
whether its content has substitutions (aka $origin) applied or not. In
particular `Eq` and `Ord` apply to unsubstituted, resp. substituted
content (which can lead to the above panic). This should be further
cleaned by having two structures, one unsubstituted and another
substituted.

---------

Co-authored-by: Clement Rey <[email protected]>
Makes the graph examples look a lil bit nicer and more compact.

Note that this is a very recent thing that we can do this in Rust 🥳 

Also, embedds `graph_directed` in the examples (this has been done
directly on the release branch already)


* [x] full check passed in order to confirm the example output is still
the same (tested this locally but who knows)
### Related
- #8522

### What
Explains how to avoid hitting an issue.
This PR enables the creation of GH releases (as draft and marked as
pre-release) for RCs.

Motivations for doing so:
- test that part of the workflow, in particular that all binaries are
correctly produced
- test the binary using `cargo binstall`
- these releases a single-click deletable from GH (if we want to do so)
- GH releases marked as "pre-release" aren't displayed in the GH project
page

Pending questions: do we want that?  what about alphas?
### Related

* Closes #6830

### What

⚠️  Breaks tensors in .rrd files!

In `TensorData` we used to have `shape: [TensorDimension]` with `struct
TensorDimension { size: u64, name: Option<String> }`.

Now `TensorData` has `shape: [u64], names: Option<[String]>` instead.

So basically a AoS -> SoA change

### TODO
* [x] Port Python
* [x] Port C++
* [x] Document in migration guide
* [x] Run `@rerun-bot full-check`

---------

Co-authored-by: Antoine Beyeler <[email protected]>
### Related

* fixes #8525

### What

Truncation now happens at egui test level, so we no longer need that
manual truncation code. (This code is soon going to disappear anyways
but at least it'll disappear in a good state 🤷🏻)


![image](https://github.com/user-attachments/assets/ee8c0d00-1ff3-4e2c-8154-41c2e1c58bae)
Co-authored-by: Clement Rey <[email protected]>
Co-authored-by: Andreas Reich <[email protected]>
Co-authored-by: Katerina Gavrilo <[email protected]>
Co-authored-by: Jochen Görtler <[email protected]>
### Related
* #7485
* #8530


### What
Update MSRV to 1.81

---------

Co-authored-by: Jochen Görtler <[email protected]>
* `HybridResultsChunkIter::component` is now
`HybridResultsChunkIter::component_slow`, in order to scare people off.
* I have removed *a lot* of those, and will remove a few more in follow
up PRs, but I need to add more iteration tools first.
* Follow-up to #8540 
* introduce `iter_bool`
* annihilate a bunch of `component_slow` using it
### Related
* Part if #3741

### TODO
* [x] `@rerun-bot full-check`
### What
This mirrors the existing Recording API surface and query-construction,
but dispatches the query through the the server.

Without access to the schema, we are not yet able to support
glob-expressions for content
(rerun-io/dataplatform#105)

Recommend viewing without whitespace:
https://github.com/rerun-io/rerun/pull/8537/files?w=1
This method makes no sense. It's a complete anti-pattern. The whole
point of the Chunk level methods is to pay the cost of
reflection/downcasting/deserialization once for the whole Chunk, this
can never happen with the way this method is defined.

I'm not sure what I was thinking back then. I likely wasn't. There is
never a good reason to use this.
This is so that I can move `fn arrow_ui` (which depend on `SizeBytes`)
into `re_ui`, as part of improved testing of it before migrating it to
arrow1.

And `re_byte_size` sounds nicer than `re_sizes_bytes`. Maybe we should
rename the trait to `ByteSize` too.

---------

Co-authored-by: Clement Rey <[email protected]>
### Related

* Fixes #6817
   * because, well, it got removed

### What

As planned, removed `DisconnectedSpace` which was deprecated in 0.21
This makes `SpatialTopology` & `TransformContext` a little bit simpler,
one thing less to take into account. Further simplifications should be
possible now, but one thing at a time.

---------

Co-authored-by: Clement Rey <[email protected]>
### What

Title.

Wonder if we should even show the forces section in the selection panel
in this case—but that might be confusing for the user too.

<!--
Make sure the PR title and labels are set to maximize their usefulness
for the CHANGELOG,
and our `git log`.

If you have noticed any breaking changes, include them in the migration
guide.

We track various metrics at <https://build.rerun.io>.

For maintainers:
* To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
* To deploy documentation changes immediately after merging this PR, add
the `deploy docs` label.
-->
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for opening this pull request.

Because this is your first time contributing to this repository, make sure you've read our Contributor Guide and Code of Conduct.

@MAVRICK-1 MAVRICK-1 merged commit 2422936 into DEVRhylme-Foundation:main Jan 2, 2025
21 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants