Skip to content

V0.0.5 #1

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

Merged
merged 3 commits into from
Nov 8, 2023
Merged

V0.0.5 #1

merged 3 commits into from
Nov 8, 2023

Conversation

TomKimsey
Copy link
Contributor

This repo is intended to be used as a common documentation source for Ewon projects. It can be used as a git submodule to allow for easy updating of common documentation accross all projects.

@TomKimsey TomKimsey requested review from alexjhawk and it-hms November 7, 2023 19:20
@TomKimsey TomKimsey self-assigned this Nov 7, 2023
@alexjhawk
Copy link
Collaborator

alexjhawk commented Nov 7, 2023

While I think the issue of duplicated common docs is a problem we need to solve, I am very unsure about using Git submodules as the solution.

Git submodules are powerful, but add extra steps to build the documentation. This adds more potential/room for confusion in the development environment, where developers should be building the documentation regularly (to accompany changelog modifications).

  • There are developers outside of the solution center that contribute to documentation and/or have forks of projects.

Additionally, requiring additional steps harms the value of the starter project being the single point for common code/structure/files.

The common docs situation does need to be resolved, and I think there may be a few alternative solutions that are more native and/or don't require additional steps.

  1. Use a Docusaurus plugin to import remote content from the relevant URL. Of interest is rdilweb/docusaurus-plugin-remote-content, which allows for remote content import without extra manual steps, but also includes support for adding/modifying/replacing content in the imported files in a customizable manner.
    • This could be added to the starter project and all repositories, referencing this repository, or it could be implemented to use the starter project as the 'content root' and cut out this repository. Either method works/is fine.
  2. Create an npm module based out of this repository which would bundle the common documentation as a dependency that can be included in the starter project's yarn config, and in turn, the child repositories.
  3. Use extensions library resources to bundle common docs files for use within connector/starter project child repositories. I'm not sure how the Docusaurus system would access the resources, but this is worth investigating as an alternative to requiring extra steps.

@TomKimsey
Copy link
Contributor Author

Git submodules are powerful, but add extra steps to build the documentation. This adds more potential/room for confusion in the development environment, where developers should be building the documentation regularly (to accompany changelog modifications).

My view is that using git submodules is normal and a developer should be comfortable with using the tool. The minimal extra steps are not an issue to me.

Additionally, requiring additional steps harms the value of the starter project being the single point for common code/structure/files.

The intent would be for this to be included in the starter project as well.

The common docs situation does need to be resolved, and I think there may be a few alternative solutions that are more native and/or don't require additional steps.

How soon can a alternative be ready to use? What is the development effort required?
This solution is ready now and connector maintenance needs to be sustainable. We can always migrate to a more optimal solution in the future.

@alexjhawk
Copy link
Collaborator

Git submodules are powerful, but add extra steps to build the documentation. This adds more potential/room for confusion in the development environment, where developers should be building the documentation regularly (to accompany changelog modifications).

My view is that using git submodules is normal and a developer should be comfortable with using the tool. The minimal extra steps are not an issue to me.

Additionally, requiring additional steps harms the value of the starter project being the single point for common code/structure/files.

The intent would be for this to be included in the starter project as well.

The common docs situation does need to be resolved, and I think there may be a few alternative solutions that are more native and/or don't require additional steps.

How soon can a alternative be ready to use? What is the development effort required? This solution is ready now and connector maintenance needs to be sustainable. We can always migrate to a more optimal solution in the future.

The reality is that not everyone will understand Git submodules, and it could become a point of confusion or failure.

Regarding an alternative, no major additional development effort is required. I have made a POC implementation you can see at hms-networks/sc-java-maven-starter-project#56.

This POC implementation uses the previously mentioned Docusaurus plugin, and requires no new/additional steps of the developed. It also still makes use of this repository for common documentation, which makes sense anyways to help reduce the duplication of files, as you mentioned, which would occur when using the starter project as a template (if the common docs simply remained there).

@TomKimsey
Copy link
Contributor Author

  1. Use a Docusaurus plugin to import remote content from the relevant URL. Of interest is rdilweb/docusaurus-plugin-remote-content, which allows for remote content import without extra manual steps, but also includes support for adding/modifying/replacing content in the imported files in a customizable manner.

    • This could be added to the starter project and all repositories, referencing this repository, or it could be implemented to use the starter project as the 'content root' and cut out this repository. Either method works/is fine.
  2. Create an npm module based out of this repository which would bundle the common documentation as a dependency that can be included in the starter project's yarn config, and in turn, the child repositories.

  3. Use extensions library resources to bundle common docs files for use within connector/starter project child repositories. I'm not sure how the Docusaurus system would access the resources, but this is worth investigating as an alternative to requiring extra steps.

Git submodules are powerful, but add extra steps to build the documentation. This adds more potential/room for confusion in the development environment, where developers should be building the documentation regularly (to accompany changelog modifications).

My view is that using git submodules is normal and a developer should be comfortable with using the tool. The minimal extra steps are not an issue to me.

Additionally, requiring additional steps harms the value of the starter project being the single point for common code/structure/files.

The intent would be for this to be included in the starter project as well.

The common docs situation does need to be resolved, and I think there may be a few alternative solutions that are more native and/or don't require additional steps.

How soon can a alternative be ready to use? What is the development effort required? This solution is ready now and connector maintenance needs to be sustainable. We can always migrate to a more optimal solution in the future.

The reality is that not everyone will understand Git submodules, and it could become a point of confusion or failure.

Regarding an alternative, no major additional development effort is required. I have made a POC implementation you can see at hms-networks/sc-java-maven-starter-project#56.

This POC implementation uses the previously mentioned Docusaurus plugin, and requires no new/additional steps of the developed. It also still makes use of this repository for common documentation, which makes sense anyways to help reduce the duplication of files, as you mentioned, which would occur when using the starter project as a template (if the common docs simply remained there).

@alexjhawk
Yeah, i just tried the same exact thing with that plugin essentially and im pretty happy with it other than some weird behavior thats causing some looping but that might just be my config. My only comments are:

@TomKimsey
Copy link
Contributor Author

@alexjhawk users will have the extra step of yarn add docusaurus-plugin-remote-content

@alexjhawk
Copy link
Collaborator

..........

@alexjhawk Yeah, i just tried the same exact thing with that plugin essentially and im pretty happy with it other than some weird behavior thats causing some looping but that might just be my config. My only comments are:

I was in the process of writing a very similar response. I definitely think versioning support will be necessary, and we could add the option to ScDocusaurusConfig.js

Regarding documentation in the starter project, I was thinking that the common documentation would be migrated to this repository. This avoids the versioned common docs files from being versioned in repositories that are created from the starter project template. The starter project would also use the plugin.

@alexjhawk
Copy link
Collaborator

alexjhawk commented Nov 7, 2023

@alexjhawk users will have the extra step of yarn add docusaurus-plugin-remote-content

The plugin inclusion is versioned as part of package.json/yarn.lock. Once the plugin is added, it is included in the normal yarn/npm/Docusaurus processes.

Nothing has changed with regard to installation/building of the documentation from where it currently is/was.

Edit

This is considering the common docs being located in this separate repository instead of the starter project. That allows us to add the plugin and import at the starter project level, which eliminates common docs entirely from being duplicated in to starter project child repos (and eliminates the extra step of installing the plugin at the child repo level)

@TomKimsey
Copy link
Contributor Author

..........
@alexjhawk Yeah, i just tried the same exact thing with that plugin essentially and im pretty happy with it other than some weird behavior thats causing some looping but that might just be my config. My only comments are:

I was in the process of writing a very similar response. I definitely think versioning support will be necessary, and we could add the option to ScDocusaurusConfig.js

Regarding documentation in the starter project, I was thinking that the common documentation would be migrated to this repository. This avoids the versioned common docs files from being versioned in repositories that are created from the starter project template. The starter project would also use the plugin.

So do you agree that the extensions lib should include documentation? I think that would be ideal as if the extension lib is updated and functionality changes the application can just reference the documentation specific to the version its using starting at 1.15.X

@alexjhawk
Copy link
Collaborator

..........
@alexjhawk Yeah, i just tried the same exact thing with that plugin essentially and im pretty happy with it other than some weird behavior thats causing some looping but that might just be my config. My only comments are:

I was in the process of writing a very similar response. I definitely think versioning support will be necessary, and we could add the option to ScDocusaurusConfig.js
Regarding documentation in the starter project, I was thinking that the common documentation would be migrated to this repository. This avoids the versioned common docs files from being versioned in repositories that are created from the starter project template. The starter project would also use the plugin.

So do you agree that the extensions lib should include documentation? I think that would be ideal as if the extension lib is updated and functionality changes the application can just reference the documentation specific to the version its using starting at 1.15.X

Do you mean for all common docs, or just things related to the extensions library?

I absolutely agree that there is 'common' documentation related to the extensions library that should live in that repository. The starter project itself hosts a Docusaurus website as well, so those extensions library-related docs really should be included there anyways. We can then also import them to the starter project/child projects as necessary.

There is definitely a need for common docs in the extensions library, but also any that may be unrelated to the library should still be able to live in this repository (or similar one separate from the starter project).

@TomKimsey TomKimsey marked this pull request as draft November 7, 2023 21:15
@TomKimsey TomKimsey changed the title V0.0.1 V0.0.5 Nov 8, 2023
@TomKimsey TomKimsey marked this pull request as ready for review November 8, 2023 13:22
@TomKimsey TomKimsey requested review from alexjhawk and it-hms November 8, 2023 13:22
@TomKimsey
Copy link
Contributor Author

@alexjhawk , moved this back out of draft. This is where non extensions lib documents will go. Started version at 0.0.5 to match starter project.

README.md Outdated
Comment on lines 4 to 16
## Usage
This repo is intended to be used as a Git submodule in an Ewon Flexy Java project utilizing the [Solution Center Ewon Flexy Extensions Library](https://github.com/hms-networks/sc-ewon-flexy-extensions-lib) with Docusaurus based documentation.

## Requirements

### ScDocusaurusConfig.js
A `ScDocusaurusConfig.js` must exists in the `web-docs` directory and must match the format defined in the sc-java-maven-starter-project [ScDocusaurusConfig.js](https://github.com/hms-networks/sc-java-maven-starter-project/blob/main/web-docs/ScDocusaurusConfig.js) file.

## Installation
```console
cd web-docs/docs
git submodule add https://github.com/hms-networks/sc-ewon-flexy-common-docs
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the README.md contents be updated to reflect the expected usage of this repository via the Docusarus plugin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it would help if i saved that file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the installation and usage section have been removed entirely. Since the starter project is what will "implement" usage I dont think this needs to be documented here.

@alexjhawk
Copy link
Collaborator

@alexjhawk , moved this back out of draft. This is where non extensions lib documents will go. Started version at 0.0.5 to match starter project.

This works. I don't think the version number in this repository will be 100% matched to the starter project, though, so something like 1.0.0 or 1.0.5 also works.

@TomKimsey TomKimsey requested a review from alexjhawk November 8, 2023 13:52
@TomKimsey TomKimsey requested a review from swapna-ragi November 8, 2023 18:40
@TomKimsey
Copy link
Contributor Author

Adding @swapna-ragi as Ian is out of the office.

@TomKimsey TomKimsey merged commit 4019721 into main Nov 8, 2023
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