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

[Feature] Commit-based Change History #47

Open
skoropadas opened this issue Apr 25, 2023 · 3 comments
Open

[Feature] Commit-based Change History #47

skoropadas opened this issue Apr 25, 2023 · 3 comments
Assignees
Labels
Status: Help wanted Extra attention is needed Type: Enhancement New feature or request

Comments

@skoropadas
Copy link
Member

Description

An idea has emerged to automatically gather and display changes that have occurred in a project based on changes in the repository.

If your project uses the commit format adopted by Angular, then NgDoc could automatically gather and display such changes on certain pages based on the scope.

Proposed solution

This function should be optional by default and only enabled after setup:

  • There should be an option to set a scope for each guide that corresponds to the scope in the commit. Based on this scope, NgDoc will gather and display changes for each page. By default, the current guide route can be used as a scope.
  • There should be an option to configure the range of versions from which changes will be gathered, for example, for the last 5 minor versions, the latest major version, etc.
  • It should be possible to configure the types of commits that should be taken when displaying changes, for example, only gathering changes for the types of docs, feat, fix.
  • In the sidebar, an icon "New"/"Update" must be displayed to inform the user that related scope to the guide has been created, changed or updated.
  • add option to avoid adding changes to the change log, it can be [skip ng-doc] tag in the body of the commit

Issues to address before implementation:

  • Should the list of changes for the API be displayed? If so, based on what criteria? One option could be to use the declaration name as a scope to match the commit change with the API page.

Alternatives considered

There is also an option to make the display of changes more flexible on any required page. For example, NgDocActions could be used to pass a list of scopes for which the list of changes needs to be rendered. In this case, it can be displayed anywhere on the page, and the issue with the API will disappear on its own because the user can decide which scopes to render for the page. However, this will add additional load on the user and require them to add such a call to every page.

@skoropadas skoropadas added Type: Enhancement New feature or request Status: Help wanted Extra attention is needed labels Apr 25, 2023
@skoropadas skoropadas self-assigned this Apr 25, 2023
@skoropadas skoropadas changed the title [Feature] Changes in scope [Feature] Commit-based Change History Apr 25, 2023
@skoropadas
Copy link
Member Author

If you have any thoughts about this feature please share!

@skoropadas skoropadas pinned this issue May 5, 2023
@semicolin
Copy link

My team does not use the Angular commit format, but I am interested in some kind of documentation history/versioning so users who are on an older version can see the documentation that matches their version.

@skoropadas
Copy link
Member Author

@semicolin This ticket is more about displaying the history of changes for specific pages. For example, if a page is dedicated to a button and its functionality, theoretically, it could automatically generate and display the history of the button's recent changes. I believe such a feature could be convenient.

Regarding versioning and documentation for different versions of the library/project, I've considered this. It's not entirely NgDoc's responsibility, and I think the optimal solution would be to create and deploy multiple Angular applications.

For instance, let's say you have a library. If you maintain multiple versions, you'll likely have branches like 1.x.x, 2.x.x, and so on in your repository to facilitate bug fixes and updates for them. Correspondingly, you'll have pipelines for releasing the library and deploying its documentation.

In theory, in your pipeline, you could publish applications on specific routes using a script or any other method based on the major version. For example, my-doc.com/v1 could point to the application from the 1.x.x branch, and my-doc.com/v2 to the application from the 2.x.x branch. In the demo application itself, you could add something like a dropdown list to switch between versions. I think this solution is the simplest; it wouldn't require extensive support and should work with your server's standard routing.

Of course, there could also be an example involving micro-frontends, but I believe it would be more complex to implement and would require additional actions when new versions of the application are released. Therefore, I would prefer the option of having multiple applications on different routes.

@skoropadas skoropadas unpinned this issue Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Help wanted Extra attention is needed Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants