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

Add copy button for configuration properties in config tables #44403

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michalvavrik
Copy link
Member

@michalvavrik michalvavrik commented Nov 9, 2024

This comment has been minimized.

This comment has been minimized.

@michalvavrik
Copy link
Member Author

michalvavrik commented Nov 9, 2024

That docs CI failure didn't fail when I build docs and served it. I'll check command used by CI and try to fix it.

Update: seems like inline macro for HTML is not used, at least I could not reproduce situation when it is used, but I don't know all the ways in which documentation is generated, so I left it there, just adjusted it to turn the copy button macro into empty <code></code> that (I tried) is not visible when part of the DOM.

@michalvavrik michalvavrik force-pushed the feature/add-config-property-copy-button branch from 1f8ae8a to ecef520 Compare November 9, 2024 16:57
Copy link

quarkus-bot bot commented Nov 9, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit ecef520.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

You can consult the Develocity build scans.

Copy link

github-actions bot commented Nov 9, 2024

🎊 PR Preview 1e2140d has been successfully built and deployed to https://quarkus-pr-main-44403-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

Copy link

quarkus-bot bot commented Nov 9, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit ecef520.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Thanks! I think we will need to implement something similar to what was done for env vars:

https://raw.githubusercontent.com/quarkusio/quarkus/ecef520cb35eb493a22f68804eb0f153d2b684aa/devtools/config-doc-maven-plugin/src/main/resources/templates/asciidoc/default/tags/envVar.qute.adoc

This is needed for the downstream doc.
But happy to discuss if you had something else in mind.

I think we could have only one common property for that as it's all about having the ability to handle the feature.

@michalvavrik
Copy link
Member Author

Thanks! I think we will need to implement something similar to what was done for env vars:

The difference is that this is inline (like this is inside table row that is inline) so you cannot use ifdef etc. Before I went this implementation, I tried to make this conditional for hours. I am no Asciidoc expert though, if you think it can be done, I'll dig again. (also I found some links to Asciidoc about that https://discuss.asciidoctor.org/Inline-Conditional-Inclusion-Macros-td3007.html that suggested the same)

This is needed for the downstream doc. But happy to discuss if you had something else in mind.

I'll come for solution for downstream, but I'll need pointers. I added that "inline macro process" that I thought is enough for any scenario that is not supported. If you tell me how downstream docs is build, I'll prepare NOOP macro.

I think we could have only one common property for that as it's all about having the ability to handle the feature.

I'd like that, but again, I don't know how to make this conditional.

@gsmet
Copy link
Member

gsmet commented Nov 12, 2024

But is it a problem if it's on another line? My understanding is that it would end up on the same line in the end? But maybe it wouldn't work?

@michalvavrik
Copy link
Member Author

But is it a problem if it's on another line? My understanding is that it would end up on the same line in the end? But maybe it wouldn't work?

It wouldn't, it doesn't matter whether it is on the next line (well it fails for different reason, IIRC it failed over unmatched endif, but I tried many variants, so I don't remember details). Problem is that ifdef only worked for blocks, but I didn't find a way to make row a block.

@gsmet
Copy link
Member

gsmet commented Nov 12, 2024

And the envVar a few lines below is not in the same situation? If adding a block solves the issue, maybe we could do the same as for .description and have a block with no styling? Would it change the output?

@michalvavrik
Copy link
Member Author

michalvavrik commented Nov 12, 2024

And the envVar a few lines below is not in the same situation?
If adding a block solves the issue, maybe we could do the same as for .description and have a block with no styling? Would it change the output?

Fair point, from DOM POV they are all div paragraphs inside one content div so there shouldn't be a problem. I'll figure why it works for the env var. Thanks

@michalvavrik michalvavrik marked this pull request as draft November 12, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants