-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add better support for scrolling content to our modals (#8492)
### 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]>
- Loading branch information
Showing
4 changed files
with
171 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from __future__ import annotations | ||
|
||
import os | ||
from argparse import Namespace | ||
from uuid import uuid4 | ||
|
||
import rerun as rr | ||
import rerun.blueprint as rrb | ||
|
||
README = """\ | ||
# Modal scrolling | ||
* Select the 2D view | ||
* Open the Entity Path Filter modal | ||
* Make sure it behaves properly, including scrolling | ||
""" | ||
|
||
|
||
def log_readme() -> None: | ||
rr.log("readme", rr.TextDocument(README, media_type=rr.MediaType.MARKDOWN), timeless=True) | ||
|
||
|
||
def log_many_entities() -> None: | ||
for i in range(0, 1000): | ||
rr.log(f"points/{i}", rr.Points2D([(i, i)])) | ||
|
||
|
||
def run(args: Namespace) -> None: | ||
rr.script_setup( | ||
args, | ||
f"{os.path.basename(__file__)}", | ||
recording_id=uuid4(), | ||
default_blueprint=rrb.Grid(rrb.Spatial2DView(origin="/"), rrb.TextDocumentView(origin="readme")), | ||
) | ||
|
||
log_readme() | ||
log_many_entities() | ||
|
||
|
||
if __name__ == "__main__": | ||
import argparse | ||
|
||
parser = argparse.ArgumentParser(description="Interactive release checklist") | ||
rr.script_add_args(parser) | ||
args = parser.parse_args() | ||
run(args) |