vaadin / docs

Official documentation for Vaadin and Hilla.
https://vaadin.com/docs
Other
27 stars 170 forks source link

docs: set testbench version as pom.xml reference instead of inline code #1871

Open MarcinVaadin opened 1 year ago

MarcinVaadin commented 1 year ago

According to https://github.com/vaadin/docs/pull/1865/files#r1015238230 dependencies should be linked from the documents. Currently, before Vaadin 24 official release it is not possible to do it this way.

This ticket is a reminder to update it in future.

mcollovati commented 1 year ago

@jouni I started replacing maven dependencies snippets with include::{root}/pom.xm..., but I wonder if the expand code feature can be confusing for the reader, as the POM file may contain configuration that are specific to the docs project.

jouni commented 1 year ago

Yes, that is a concern. At the moment there’s no official way to suppress the expand button. You can add some custom CSS to hide it, but it’s not really pretty and can break if the internal class name changes:

[source,xml,role="hide-expand"]
----
include::pom.xml[tag=foobar,indent=0]
----

++++
<style>
.hide-expand [class*=expandCodeButton] {
  display: none;
}
</style>
++++
mcollovati commented 1 year ago

It seems a bit tricky :smile: Since this replacement seems not to be a critical issue, can we postpone the change until there will be the official way to handle the snippet without expansion?