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

CommonMarkViewer adds empty veritcal space around it #54

Closed
emilk opened this issue Jun 23, 2024 · 0 comments · Fixed by #56
Closed

CommonMarkViewer adds empty veritcal space around it #54

emilk opened this issue Jun 23, 2024 · 0 comments · Fixed by #56
Labels
bug Something isn't working

Comments

@emilk
Copy link
Contributor

emilk commented Jun 23, 2024

Repro

fn main() -> eframe::Result<()> {
    let mut md_cache = egui_commonmark::CommonMarkCache::default();

    eframe::run_simple_native("Markdown viewer", Default::default(), move |ctx, _frame| {
        egui::CentralPanel::default().show(ctx, |ui| {
            ui.label("Not markdown.");
            ui.label("Not markdown either.");
            let markdown = "This is markdown.";
            egui_commonmark::CommonMarkViewer::new("viewer").show(ui, &mut md_cache, markdown);
            ui.label("Not markdown again.");
            ui.label("Not markdown either.");
        });
    })
}

Result

Screenshot 2024-06-23 at 22 08 21

Expected

I would expect that CommonMarkViewer would add the normal item spacing between elements, i.e. that we would get this:

Screenshot 2024-06-23 at 22 09 27
emilk added a commit to rerun-io/rerun that referenced this issue Jun 24, 2024
### What
* Part of #6556

Now that we can override all kinds of components in the UI, we should
also take care to explain them to the user.

Previously all the user had to go on was the name. With this PR they get
the first line of the docstring for the component, plus a link to the
full docs on our website.

This required adding a new (generated) reflection API.


![image](https://github.com/rerun-io/rerun/assets/1148717/358b1517-a36f-4b7c-8dd0-fc42f29a2e78)

Best reviewed commit-by-commit.

### Related
* lampsitter/egui_commonmark#54

### Later PR
* #6616

### 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/6609?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/6609?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/6609)
- [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`.

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
@lampsitter lampsitter added the bug Something isn't working label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants