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

Change alignment of columns in table #77

Open
lisaonduty opened this issue Nov 19, 2020 · 2 comments
Open

Change alignment of columns in table #77

lisaonduty opened this issue Nov 19, 2020 · 2 comments

Comments

@lisaonduty
Copy link

lisaonduty commented Nov 19, 2020

Hi,

We want to have top aligned Name column in the table for our generated macro documents.
The reason for this is because sometimes we have quite much text in the Description column and then the Name is hard to see when it's aligned in the middle.

We have tried to keep the Markdown format in the template and achieve this but have failed with that.
Instead of:

| Name  | Description | Default Value |
| :------------- | :------------- | :------------- |
#foreach ($param in $funcInfo.getParameterList())
| <a id="${funcInfo.functionName}-${param.name}"></a>$param.name | #if(!$param.docString.isEmpty()) ${util.markdownCellFormat($param.docString)} #else <p align="center"> - </p> #end  | #if(!$param.getDefaultValue().isEmpty()) <code>$param.getDefaultValue()</code> #else none #end|
#end

We have now added html to be able to get the alignment:

<table>
<tr>
<th align="left">Name</th>
<th align="left">Description</th>
<th align="left">Mandatory</th>
<th align="left">Default Value</th>
</tr>
#foreach ($param in $funcInfo.getParameterList())
<tr>
 <td valign="top" align="left"><a id="${funcInfo.functionName}-${param.name}"></a>$param.name </td>
 <td align="left">

#if(!$param.docString.isEmpty()) ${util.markdownCellFormat($param.docString)}#else <p align="center"> - </p> #end

 </td>
 <td align="left"> $param.mandatory </td>
 <td align="left"> #if(!$param.getDefaultValue().isEmpty())<code>$param.getDefaultValue()</code> #else none #end </td>
</tr>
#end
</table>

It's not what we prefer since it will not be as nice to read as Markdown.

Do you have any idea how to fix this and still keep the Markdown format?

We can live with our html in the template but it's not the preferred solution.

Thanks!

@brandjon
Copy link
Member

Hi @lisaonduty,

Sorry for the delay in a response to this and other issues you've filed. At the moment we have plans to rework how Stardoc integrates with Bazel so that it's less brittle. This unfortunately means that we're not prioritizing feature requests and formatting issues unless they majorly impact Stardoc's usability or are clear regressions.

@lisaonduty
Copy link
Author

Thanks @brandjon for your response,
This is not the most prioritized task with our own documentation.
As I said previous, we can live with our html-template.
I think that it will be great if Stardoc gets improved and uses a Bazel evaluation then I think/hope that using Stardoc rules will work the same as using Bazel. In another ticket I have filed about dependencies for example shows how it differs. So I look forward to the updated Stardoc :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants