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

Add a language to describe CHANGELOG.md files #834

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

alexanderpann
Copy link
Collaborator

@alexanderpann alexanderpann commented Apr 28, 2024

It is based on jetbrains.mps.lang.text and not de.slisson.mps.richtext and uses com.dslfoundry.plaintextflow for generating the Markdown file. There is some additional documentation in the inspector of the Changelog concept:

Screenshot 2024-04-28 at 23 45 38

The generated file is currently copied to the root directory with the Gradle task copyReadme which should be improved. The language supports the change headers formats version + date and month + year:

First format:

Screenshot 2024-04-28 at 23 39 03 Screenshot 2024-04-28 at 23 40 53

Second format:

Screenshot 2024-04-28 at 23 39 15

Copy link
Collaborator

@psuzzi psuzzi left a comment

Choose a reason for hiding this comment

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

The Changelog contains [0..1] header:Text and [1..n] releases:Release.
The Release holds

  • [1] header IReleaseHeader, that concretely can be MonthYearReleaseHeader or VersionDateReleaseHeader (the latter allows for SemanticVersion)
  • [1..n] sections: ChangeSection, each of which is a [1..n] collection of Line with elements: TextElement

image

The generator is well-thought for generating .md files (for now), and is extensible to other formats.

The editors provide the basic editing functionalities, mostly through intentions.

This initial submission for the language looks good to me.

For the future, I would consider editor improvements, such as warning when Release entries are not in reverse-chronological order and auto-transform code when entering ` ` (backticks) or auto create bullet-lists when entering - (but this would make the language more specific - hence a discussion will be needed)

image

@alexanderpann alexanderpann marked this pull request as ready for review April 29, 2024 15:41
@alexanderpann
Copy link
Collaborator Author

auto create bullet-lists when entering -

This is already supported by entering "*" instead of "-".
I've implemented the sorting order check but not the automatic replacement of the backticks. I am not sure how you correctly extend the language jetbrains.mps.lang.text. I'd love to see something like a floating palette or the context actions tool to host such formatting actions.

@alexanderpann alexanderpann merged commit f4b482f into maintenance/mps20213 Apr 29, 2024
1 check passed
@alexanderpann alexanderpann deleted the feature/changelog branch April 29, 2024 15:59
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.

None yet

2 participants