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

feat: update configuration doc #1672

Merged
merged 1 commit into from
Jun 6, 2024
Merged

feat: update configuration doc #1672

merged 1 commit into from
Jun 6, 2024

Conversation

sdo-1A
Copy link
Contributor

@sdo-1A sdo-1A commented Apr 16, 2024

Proposed change

Update documentation on configuration

@sdo-1A sdo-1A requested a review from a team as a code owner April 16, 2024 14:48
Copy link

nx-cloud bot commented Apr 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 9b25f62. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 16, 2024
@sdo-1A
Copy link
Contributor Author

sdo-1A commented Apr 17, 2024

I did not realize that there were already updates on this documentation in another PR: #1583
So I have merged both modifications into another commit (which I will stage once we are ready to merge).

I also tried to resolve the comments from the other PR (which I will copy paste into the code to make it simpler to review).
Other comments not resolved:
https://github.com/AmadeusITGroup/otter/pull/1583/files#r1557503693
https://github.com/AmadeusITGroup/otter/pull/1583/files#r1557507384

__Pre-bootstrap configuration__

- Defined in one interface extending the __AppBuildConfiguration__ from __@o3r/core__ in order to be identified by the extractor.
- Used for configurations needed before loading the Angular application component. They will be
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment from @pginoux-1A:
It's not injected by the CMS, there is no runtime interactions with the CMS, it's used as an edition panel for the customization and the files are exported in the dynamic content folder afterwards. We should advertise that this part is linked to a piece of code server side that updates the index.html and what requires to be added with an example

https://github.com/AmadeusITGroup/otter/pull/1583/files#r1557804902

@sdo-1A sdo-1A force-pushed the doc/config branch 2 times, most recently from a3dca3d to 87d0b96 Compare April 18, 2024 09:14
mrednic-1A
mrednic-1A previously approved these changes Apr 18, 2024
cpaulve-1A
cpaulve-1A previously approved these changes Apr 18, 2024
@sdo-1A sdo-1A force-pushed the doc/config branch 2 times, most recently from e88256f to 5c020fc Compare April 24, 2024 14:14
* If the __component extractor__ is run on an application with components from an Otter library, the `libraries` option can be used to concatenate the metadata files generated for the application with the ones from the specified libraries.
The extractor will search for the component configuration and style metadata files in the `node_modules` package of each configured library.
The name of the metadata files to search for is defined for each library in the `cmsMetadata` property defined in their respective `package.json` files.
* Here is an example of an `angular.json` file:
Copy link
Contributor

Choose a reason for hiding this comment

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

it looks weird to have an example of angular.json after a whole paragraph about package.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you suggest rephrasing or to remove the example?

- the second priority is the priority by component type set in the store
- the lowest priority is the default config set on component (in the config.ts file of the component)
- The highest priority is the one passed as input from a parent component
- The second priority is the priority by component ID set dynamically
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure to understand this part
also, is it not already kind of covered by the schema in the Component configuration types section ?

Copy link
Contributor Author

@sdo-1A sdo-1A May 3, 2024

Choose a reason for hiding this comment

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

This corresponds to the customized configuration, I can rephrase if the sentence is not clear enough


- At __library__ level we have the config for components (__blocks, components, elements__).
- At __library__ level, we have the configuration for `Block` and `ExposedComponent`, see [available component types](https://github.com/AmadeusITGroup/otter/blob/main/docs/components/INTRODUCTION.md#component-type).
Copy link
Contributor

Choose a reason for hiding this comment

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

You can define component in your application also

injected by the CMS in the index.html body tag data-bootstrapconfig as a data attribute
- Defined in one interface extending the __AppBuildConfiguration__ from __@o3r/core__ in order to be identified by the extractor.
- Used for configurations needed before loading the Angular application component. It is up to the server to specify the body tag
`data-dynamiccontentpath` as a data attribute inside the `index.html` so the application can get the latest version of the dynamic
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure dynamiccontentpath as something related to the configuration

1) inline definition (see above `myUnionTypeField`)
2) reference to a union type that is defined in the same configuration file (see above `myReferencedUnionTypeField` and `Position`).

### Configuration tags
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add that we expose a linter for that docs/linter/eslint-plugin/rules/o3r-categories-tags.md

Copy link
Contributor

Choose a reason for hiding this comment

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

And a vscode extension for autocomplete

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 will open an issue once the PR is merged

Copy link
Contributor Author

Choose a reason for hiding this comment

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

}
```

### Configuration categories
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add that we expose a linter for that docs/linter/eslint-plugin/rules/o3r-widget-tags.md

Copy link
Contributor

Choose a reason for hiding this comment

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

And a vscode extension for autocomplete

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 will open an issue once the PR is merged

Copy link
Contributor Author

Choose a reason for hiding this comment

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

kpanot
kpanot previously approved these changes May 24, 2024
@sdo-1A sdo-1A added this pull request to the merge queue Jun 6, 2024
Merged via the queue into main with commit fa07dab Jun 6, 2024
28 checks passed
@sdo-1A sdo-1A deleted the doc/config branch June 6, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request project:@o3r/configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants