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

Support arbitrary action buttons for list item2 #6191

Open
Tracked by #6075
abey79 opened this issue May 2, 2024 · 2 comments
Open
Tracked by #6075

Support arbitrary action buttons for list item2 #6191

abey79 opened this issue May 2, 2024 · 2 comments
Labels
ui concerns graphical user interface

Comments

@abey79
Copy link
Member

abey79 commented May 2, 2024

Currently, PropertyContent supports only one action button, but it would be nice to have support for more than 1. After discussing with @martenbjork, we should use the following strategy:

  • each PropertyContent can have an arbitrary number of action buttons
  • the right gutter is sized according to the maximum action button used in a given list item scope
  • if that gutter size is too big w.r.t the available content, it can be reduced to be just one button wide
  • if that's the case, then item with more than 1 action button will display a button and show available action in some on-hover/on-tap mini toolbar
@abey79
Copy link
Member Author

abey79 commented Jun 27, 2024

Part/related to this issue:

  • LabelContent::with_buttons() should be reconciled with the ItemButton abstraction, probably in a similar way as the multi-button discussion above.
  • Then, SectionCollapsingHeader::help() should also be implemented using that abstraction, by making a new ItemHelpButton implementation of ItemButton.

@abey79
Copy link
Member Author

abey79 commented Jun 27, 2024

abey79 added a commit that referenced this issue Jun 27, 2024
### What

* Builds on #6657
* Part of #6655 

This PR is mainly a refactor that abstract the buttons used by
`PropertyContent` and `SectionCollapsingHeader`. (This refactor is
partial and should also be applied to `LabelContent` -> #6191).

This enables action button in section header, used to remove the "edit"
button of the entity filter:
<img width="356" alt="image"
src="https://github.com/rerun-io/rerun/assets/49431240/f430805e-2b93-4134-bdbc-fcbbdbbc68e9">


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6662?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6662?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/6662)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui concerns graphical user interface
Projects
None yet
Development

No branches or pull requests

1 participant