Skip to content

UILD-578: use separate profiles for Work and Instance #176

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SKarolFolio
Copy link
Contributor

@SKarolFolio SKarolFolio commented Jul 2, 2025

Loading separate profiles for Work and Instance on the Create resource page
https://folio-org.atlassian.net/browse/UILD-578

Technical details:
The Create Work page now makes a request for the Work profile. The Create Instance page makes two requests: one for the Instance profile to render the work form and another for the Work profile to render the preview section with the linked Work data.

To implement this, a new hook has been introduced to load profiles, along with a new configuration to determine the root entry of the Monograph profile. Additionally, the general logic has been updated to apply the configuration and load the required profiles.

@SKarolFolio SKarolFolio requested review from zepheiryan, pkjacob and a team July 2, 2025 11:38
Copy link

github-actions bot commented Jul 2, 2025

Jest Unit Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 654cde0. ± Comparison against base commit 03d2f7c.

♻️ This comment has been updated with latest results.

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.

Please update CHANGELOG.md.

Sorry, there's just not enough information here for me to usefully evaluate this work.

  • The PR description is effectively blank
  • The Jira feature is very high level, which is fine, but given the PR itself provides no additional details WRT an implementation plan, it is hard to understand
  • There are no code comments aside from a few "TODO" entries

If you want a review from an external team, please provide more context generally, or point to a specific issue in the code that you think would benefit from scrutiny.

Copy link

sonarqubecloud bot commented Jul 2, 2025

@SKarolFolio SKarolFolio requested a review from zburke July 2, 2025 12:53
let ids: number[] = [];

if (pageType === ResourceType.work) {
ids = [api.work];
Copy link
Contributor

Choose a reason for hiding this comment

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

Wanted to make sure that the following use case is considered -

When a Work with only one associated Instance is opened for editing, the UI should display the Work in edit mode on the left side and the Instance in read-only mode on the right. This means we'll need to fetch profiles for both the Work and the Instance, correct? Will this be handled later?

Copy link
Contributor Author

@SKarolFolio SKarolFolio Jul 3, 2025

Choose a reason for hiding this comment

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

Yes, this will be implemented in the next PRs.
As we discussed offline and how it was added to the Jira ticket, the scope of this PR is limited to the Create Work/Instance page. As for the Edit page, it will be handled separately (as well as Preview, Compare, Duplication functionality), it still uses the old composite profile, which includes both work and instance data. That's why we still need linked-data/profile/1 endpoint.

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.

4 participants