Skip to content

Move roles along with person#82

Merged
progval merged 10 commits intocodemeta:masterfrom
bact:move-role
Oct 24, 2025
Merged

Move roles along with person#82
progval merged 10 commits intocodemeta:masterfrom
bact:move-role

Conversation

@bact
Copy link
Copy Markdown
Contributor

@bact bact commented Oct 11, 2025

Currently, when a user moves an author/contributor, the roles associated with that author/contributor didn't move together with the author/contributor

not-move

This PR:

  • Fix movePerson(), so when person moves, moves roles with the person
    • To simplify the node traversal, author_list and contributor_list are introduced, so we can guaranteed that elements in the list are all persons (the _container is a mix of persons and control buttons) - with this we can be more precise/efficient when using selectors.
    • The movePerson() now actually move the DOM nodes, so all the nodes' children (including roles) follows automatically
    • Fix "wrap around" test cases - Fix Person wrap around test cases are wrong #83
  • Add remove button to remove a person at any position in the list
    • With the simplified traversal, it is easier to remove person at any location. So take opportunity to add this feature.

fixed

- When person moves, moves roles with the person
- Add remove button to remove a person at any position in list

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact marked this pull request as draft October 12, 2025 00:15
bact added 3 commits October 12, 2025 10:45
Also trying to do getElementById when possible, instead of querySelector(#id)

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Use names One, Two, Three .. to make it easy to follow

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact marked this pull request as ready for review October 12, 2025 16:34
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Comment thread js/codemeta_generation.js Outdated
bact and others added 5 commits October 18, 2025 19:31
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Use codemetaGenerationEnabled to control if codemeta is to be generated or not

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Co-Authored-By: Val Lorentz <progval+github@progval.net>
@bact bact requested a review from progval October 21, 2025 21:40
@progval progval merged commit a81b7d8 into codemeta:master Oct 24, 2025
1 check passed
@bact bact deleted the move-role branch October 24, 2025 16:43
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.

Person wrap around test cases are wrong

2 participants