Skip to content

[DOCS] Regenerate the class diagram in the README #1298

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oliverklee
Copy link
Collaborator

The class diagram is (almost) unchanged to the output from tasuku43/mermaid-class-diagram, except for the kept direction LR.

This is in preparation for adding a script for auto-creating the class diagram in #1297.

@oliverklee oliverklee requested review from sabberworm and JakeQZ June 29, 2025 14:53
@oliverklee oliverklee self-assigned this Jun 29, 2025
@oliverklee oliverklee added documentation developer-specific Issues that only affect maintainers, contributors, and people submitting PRs labels Jun 29, 2025
@coveralls
Copy link

coveralls commented Jun 29, 2025

Coverage Status

coverage: 57.935%. remained the same
when pulling adeb8fb on docs/update-class-diagram
into 674cfa0 on main.

@oliverklee oliverklee marked this pull request as draft June 29, 2025 14:56
@oliverklee
Copy link
Collaborator Author

Marking this as draft for now. I'll first reorder the classes in the diagram to make this PR here a bit smaller.

@JakeQZ
Copy link
Collaborator

JakeQZ commented Jun 30, 2025

It would be nice if the diagram had fewer criss-crossing paths. AI should be good at that, but seems to be vastly overrated :/

@oliverklee oliverklee force-pushed the docs/update-class-diagram branch from dff73f2 to c2891db Compare June 30, 2025 13:53
@oliverklee oliverklee force-pushed the docs/update-class-diagram branch from c2891db to 207d21e Compare July 2, 2025 14:15
@oliverklee oliverklee marked this pull request as ready for review July 2, 2025 14:16
@oliverklee oliverklee requested a review from JakeQZ July 2, 2025 14:16
Copy link
Collaborator

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

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

The previous source for the diagram had entries like

URL --> "1" CSSString: url

whereas now we have

URL ..> CSSString: dependency

So we no longer identify the property that has the dependency (or whether it's as a single object, array, or whatever). Is there any reason for this change?

@oliverklee
Copy link
Collaborator Author

So we no longer identify the property that has the dependency (or whether it's as a single object, array, or whatever). Is there any reason for this change?

The old version of the generator which we used did not recognize associations at all. That's why I manually added those to the diagram, including the name of the corresponding property.

The current version of the generator does recognize associations, even though it only labels them as "dependency", but not with the name of the corresponding property.

Copy link
Collaborator

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

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

I spent a bit of time reordering the original 'relationships' section, after changing to the now-generated syntax, to conclude that there a quite a few differences there.

I think this needs three separate pre-patches so the diffs can be more clearly seen (along the lines of #1299):

  1. Move class URL to be ASCII-sorted;
  2. Change to use ..>, dependency and remove "*"/"1";
  3. Reorder the relationships to be consistent with the generated order.

For reference, what I did for reviewing is on the branch at https://github.com/MyIntervals/PHP-CSS-Parser/tree/docs/class-diagram-review and includes all three of the above, which need to be split. And I may have made mistakes: there was a lot of cutting and pasting

@oliverklee
Copy link
Collaborator Author

I think this needs three separate pre-patches so the diffs can be more clearly seen

Makes sense, will do.

@oliverklee oliverklee marked this pull request as draft July 4, 2025 13:12
@oliverklee oliverklee force-pushed the docs/update-class-diagram branch 3 times, most recently from 9eab188 to d98dc23 Compare July 4, 2025 14:11
The class diagram is (almost) unchanged to the output
from `tasuku43/mermaid-class-diagram`, except for the
kept `direction LR`.

This is in preparation for adding a script for auto-creating
the class diagram in #1297.
@oliverklee oliverklee force-pushed the docs/update-class-diagram branch from d98dc23 to adeb8fb Compare July 4, 2025 15:01
oliverklee added a commit that referenced this pull request Jul 5, 2025
oliverklee added a commit that referenced this pull request Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-specific Issues that only affect maintainers, contributors, and people submitting PRs documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants