-
Notifications
You must be signed in to change notification settings - Fork 14
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 Pronouns Support to Author Metadata and User Profiles #1695
Conversation
👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good overall. Unfortunately when I run this, set my pronouns, and save, they don't appear on my profile. When I go back to the Edit screen, they don't show up there, either. It seems like they get lost somewhere, but at this point I'm not sure where that is. I read all the code here on GitHub and didn't see where the issue is, so I guess it'll take a little debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can revert these changes; I don't think anything should need to change in version 19 of the data model.
@rabble do you plan to also display the pronouns on the ProfileView and/or ProfileHeader? |
Co-authored-by: Josh Brown <[email protected]>
…ser profile websites if they're set
👀 |
also: fixed lint errors and a warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last suggestion; I'll go ahead and commit and merge. This looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
Description
This pull request adds support for managing and displaying pronouns in the
Author
metadata and user profiles. The changes introduce thepronouns
attribute to theAuthor
Core Data entity, ensure it is properly hydrated from metadata events, and allow users to edit and publish their pronouns through theProfileEditView
. Pronouns are now fully integrated across the data model, user interface, and backend services.Key Changes
Core Data Updates:
pronouns
attribute to theAuthor
Core Data entity.Nos 20
to support the newpronouns
attribute.Author+CoreDataProperties
to reflect the new attribute.Metadata Handling:
MetadataEventJSON
to include apronouns
property, allowing parsing and serialization of pronouns in metadata events.hydrateMetaData
function inEvent+Hydration.swift
to setAuthor.pronouns
from parsed metadata.Profile Management:
NosTextField
for pronouns inProfileEditView
, allowing users to view and update their pronouns.author.pronouns
with the backend throughCurrentUser+PublishEvents.swift
.Localization:
Localizable.xcstrings
file to support internationalization.Data Model Validation:
Author.dictionary
property to include pronouns when generating metadata.Outstanding Work
This PR requires database migration to
Nos 20
before it can be safely merged. While the PR includes the necessary changes to the Core Data model, a migration path needs to be defined to ensure that the existing database can upgrade smoothly to the new schema.Help Needed:
Nos 20
version to include the newpronouns
field in theAuthor
entity.PersistenceController
handles the new schema without data loss.PersistenceController
:PersistenceController
fromversion = 3
toversion = 20
to trigger the migration process.Next Steps for Migration:
Update the
version
in thePersistenceController
:Ensure the
loadPersistentStores
method includes migration options:Nos 19
) to ensure the migration completes successfully.Testing Steps
Profile Edit View:
Metadata Hydration:
pronouns
field is correctly saved in Core Data and displayed in the app.Localization:
Migration Testing:
Nos 20
database.Nos 20
completes without errors and retains data integrity.Technical Details
Nos 20
schema."pronouns"
with the English translation"Pronouns"
toLocalizable.xcstrings
.pronouns
are missing in older metadata events or Core Data models.Impact
Nos 20
without breaking existing functionality.Code Review Checklist
Nos 20
is correctly implemented.