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 SVG icons to field types. #126

Merged
merged 7 commits into from
Jun 26, 2024
Merged

Add SVG icons to field types. #126

merged 7 commits into from
Jun 26, 2024

Conversation

rosiel
Copy link
Member

@rosiel rosiel commented Jun 13, 2024

GitHub Issue: none

Other Relevant Links (Google Groups discussion, related pull requests,
Release pull requests, etc.): Previously mentioned in a Tech Call.

What does this Pull Request do?

Make the Add Field interface pretty for these field types.

Screenshot 2024-06-13 at 6 01 01 PM

What's new?

  • Use the new Drupal 10.2 Field Type API -- this is why it's draft, until we can drop 10.1 - to define our Typed Relation as a category. Now it works like the Reference field, where you select a category then select a sub-type.

  • Added three SVG icons for our fields, based off the icons of the field types they're based on.

  • Added a library to add those CSS classes

  • Did a hook form alter to add our CSS library to the form. (I declined to use the Form Alter As Plugin module, though it seems cool.)

  • Does this change require documentation to be updated? - Maybe screenshots, when we get the rest of our weird fields prettified.

  • Does this change add any new dependencies? no

  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? no

  • Could this change impact execution of existing code? no

How should this be tested?

  • Go to the Add field interface.
  • Do EDTF, Authority Link, and Typed Relation show up with decorative icons? Yay!

Additional Notes:

Any additional information that you think would be helpful when reviewing this
PR.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora/committers

@seth-shaw-asu
Copy link
Member

Looks nice.

I'm wondering if the Authority Link would be better as a link superimposed over the Selection list icon; since it is essentially a link field combined with a selection list field.

@rosiel
Copy link
Member Author

rosiel commented Jun 14, 2024

I could do that with Typed Relation, too.

@rosiel
Copy link
Member Author

rosiel commented Jun 14, 2024

New screenshot:
Screenshot 2024-06-14 at 10 22 43 AM

@rosiel rosiel marked this pull request as ready for review June 21, 2024 17:51
Copy link
Member

@seth-shaw-asu seth-shaw-asu left a comment

Choose a reason for hiding this comment

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

👍

@seth-shaw-asu seth-shaw-asu merged commit b6b9f50 into 2.x Jun 26, 2024
8 checks passed
@joecorall joecorall deleted the icons branch June 26, 2024 21:09
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.

2 participants