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

UIU-3119: Pronoun Field - User Record Edit #2848

Merged
merged 3 commits into from
Jan 30, 2025
Merged

UIU-3119: Pronoun Field - User Record Edit #2848

merged 3 commits into from
Jan 30, 2025

Conversation

s3fs
Copy link
Contributor

@s3fs s3fs commented Jan 29, 2025

Add pronouns field to user edit view and display pronouns in its header alongside with user's name if they're present.

https://folio-org.atlassian.net/browse/UIU-3119

@OleksandrHladchenko1 OleksandrHladchenko1 requested a review from a team January 29, 2025 09:49
"users": "16.3",
"users": "16.4",
Copy link
Member

Choose a reason for hiding this comment

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

Dropping support for an interface version is a breaking change. You must update the major version of this package in package.json or surround this new functionality with an <IfInterface> conditional that specifies the minimum version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done @zburke. Could you please check if it's correct?

Copy link
Member

@zburke zburke left a comment

Choose a reason for hiding this comment

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

Full disclosure: I saw the updated okapiInterface version in the first revision and did not read past that for my initial review.

Now that I'm looking at the details, this work may be backwards compatible depending how mod-users is implemented. If it ignores unknown fields (as it should IMO) then you're safe and the original commit, sans the interface version update, would be just fine. If mod-users panics when it receives unknown fields, as many of our modules do 🙄 , then we do need to bump the interface version. In any case, the current implementation is correct, and if you're happy with it then so am I.

@s3fs
Copy link
Contributor Author

s3fs commented Jan 30, 2025

the original commit, sans the interface version update, would be just fine.

Not sure I understand this part @zburke. How would this work if we're not specifying the interface version required for this frontend functionality to work?

@zburke
Copy link
Member

zburke commented Jan 30, 2025

An okapiInterface dependency like 16.3 is equivalent to ^16.3 (I have no idea why the syntax is different) so if the new fields were truly optional on the FE and BE, then the original PR could have been OK in the sense that "submitting a form with unsupported but optional fields would not cause an error". Showing fields that wouldn't be saved would not be a great experience, of course, but it wouldn't be an error either.

@s3fs
Copy link
Contributor Author

s3fs commented Jan 30, 2025

I have tested it locally with okapiInterfaces set to "users": "16.3" against https://folio-dev-volaris-okapi.ci.folio.org and it works fine. I guess it would be better to remove the version bumps I've done then? @zburke

@s3fs s3fs merged commit e816e9f into master Jan 30, 2025
5 checks passed
@s3fs s3fs deleted the UIU-3119 branch January 30, 2025 14:15
@zburke
Copy link
Member

zburke commented Jan 30, 2025

I have tested it locally with okapiInterfaces set to "users": "16.3" against https://folio-dev-volaris-okapi.ci.folio.org and it works fine. I guess it would be better to remove the version bumps I've done then?

Setting the interface version in UI code isn't the thing you need to test here. You need to test against a BE that only provides 16.3.

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.

3 participants