Skip to content

generate a documentation page for every components#350

Merged
ramedina86 merged 14 commits intowriter:devfrom
FabienArcellier:45-generate-a-documentation-page-for-every-components
Mar 28, 2024
Merged

generate a documentation page for every components#350
ramedina86 merged 14 commits intowriter:devfrom
FabienArcellier:45-generate-a-documentation-page-for-every-components

Conversation

@FabienArcellier
Copy link
Contributor

@FabienArcellier FabienArcellier commented Mar 25, 2024

Generate a dedicated space to navigate inside existing components

Peek 2024-03-27 22-50

components.forEach((component) => {
// eslint-disable-next-line prettier/prettier
const componentFile = 'Core' + component.type[0].toUpperCase() + component.type.slice(1) + '.vue';
component.source_link = `ui/src/core_components/${component.category.toLowerCase()}/${componentFile}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not satisfied with this solution. @ramedina86 / @raaymax Do you have a recommendation for properly retrieving the path of a component?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Only other solution I can come up with is adding something like this

		_source: import.meta.url.split("core_components")[1],

to every component we have

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback. I think I'll keep this code and add automatic tests to enforce the component file tree structure. I am convinced adding this line into all the component.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I found even better solution! I need to test it first tho...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Great job with this @raaymax , the original solution would have indeed been rather fragile.

@FabienArcellier FabienArcellier force-pushed the 45-generate-a-documentation-page-for-every-components branch 3 times, most recently from ee5505a to b634463 Compare March 26, 2024 17:20
@FabienArcellier FabienArcellier force-pushed the 45-generate-a-documentation-page-for-every-components branch 9 times, most recently from 0e4bfde to 0c0d0c0 Compare March 26, 2024 22:45
@FabienArcellier
Copy link
Contributor Author

I have to edit the option with yes and no.

image

@FabienArcellier
Copy link
Contributor Author

The options should be visible in the comment after attributes

image

@FabienArcellier FabienArcellier force-pushed the 45-generate-a-documentation-page-for-every-components branch from 057e40f to 122d916 Compare March 27, 2024 07:27
@FabienArcellier
Copy link
Contributor Author

add the documentation field when it's present below the image

@FabienArcellier FabienArcellier force-pushed the 45-generate-a-documentation-page-for-every-components branch 2 times, most recently from 856adf8 to 65db785 Compare March 27, 2024 21:17
@ramedina86
Copy link
Collaborator

I have to edit the option with yes and no.

image

What did you mean by this?

@writer writer deleted a comment from netlify bot Mar 28, 2024
@ramedina86
Copy link
Collaborator

@FabienArcellier can you please merge dev into your branch? Latest changes by Mateusz create conflicts here:

ui/components.json
ui/src/core_components/content/CoreMessage.vue
ui/tools/generator.js

@FabienArcellier FabienArcellier force-pushed the 45-generate-a-documentation-page-for-every-components branch from df8b70b to 8d1ea56 Compare March 28, 2024 13:13
refactoring generators to have one generator per usecase.
generate md files with title and description
generate md files with syntax highlighting for event
generate dedicated page to component list
add the default value
add the link to the source code
* refact: remove independant datasource
* compile documentation from component
* fix: fix link of backend driven ui
* set developper commande to build en run documentation from alfred
@FabienArcellier FabienArcellier force-pushed the 45-generate-a-documentation-page-for-every-components branch from 8d1ea56 to 0e45ba5 Compare March 28, 2024 13:38
@FabienArcellier
Copy link
Contributor Author

I have to edit the option with yes and no.
image

What did you mean by this?

It was not practical to have different order when reading it.

@ramedina86 ramedina86 merged commit 469cce3 into writer:dev Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants