-
Notifications
You must be signed in to change notification settings - Fork 183
feat: library section and subsection page #2032
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
feat: library section and subsection page #2032
Conversation
|
Thanks for the pull request, @navinkarkera! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
664629a to
6b5030f
Compare
acb8c17 to
b5e0478
Compare
|
@rpenido Ready for another round of review. |
| */ | ||
| export function getBlockType(usageKey: string): string { | ||
| if (usageKey && usageKey.startsWith('lb:')) { | ||
| if (usageKey && (usageKey.startsWith('lb:') || usageKey.startsWith('lct:'))) { |
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.
This change means we don't really need getContainerTypeFromId -- since it's only really used in one place, could we move its tests over to this method and remove it entirely?
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.
Done. aea42e8
rpenido
left a comment
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.
LGTM 👍
Thank you for your work, @navinkarkera!
- I tested this using the instructions from the PR
- I read through the code
- I checked for accessibility issues
- Includes documentation
| children?: React.ReactNode | null, | ||
| actions: React.ReactNode | null, |
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.
nit: ReactNode typing already includes null
| children?: React.ReactNode | null, | |
| actions: React.ReactNode | null, | |
| children?: React.ReactNode, | |
| actions: React.ReactNode, |
| } | ||
| } | ||
| navigateTo({ [`${containerType}Id`]: containerKey }); | ||
| }, [containerKey, infoSidebarIsOpen]); |
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.
nit
| }, [containerKey, infoSidebarIsOpen]); | |
| }, [containerKey, infoSidebarIsOpen, navigateTo]); |
|
@navinkarkera Do you think you can solve this issue in this task? It's the same as #2008 (comment) |
|
@navinkarkera I found the following issue:
|
ChrisChV
left a comment
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.
Looks good! I left some comments and nits
| }); | ||
| } catch (err) { | ||
| showToast(intl.formatMessage(containerMessages.updateContainerErrorMsg)); | ||
| throw err; |
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.
@navinkarkera is it necessary to throw the error? Doesn't this cause errors to be displayed in the interface?
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 am not sure about the reason behind it but the exception is caught here: https://github.com/open-craft/frontend-app-authoring/blob/e36b5ae0c000a34a8daf5bf4cac669e51e8e741e/src/generic/inplace-text-editor/index.tsx#L46.
Maybe @rpenido can elaborate.
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.
This was used to rollback the optimistic update on the edit component, but I it doesn't seem to used anymore.
@navinkarkera If you have some time, could you remove this throw?
We can also remove the catch block from the component, but we need remove all throws from the handle functions.
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 removed/updated this on 0658029
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.
@rpenido Because of this broken test, I prefer to keep the catch block, for any error thrown, intentional or unintentional
@ChrisChV Good catch!. Fixed it by invalidating all container queries on save: a905019 |
I'll try and create a new PR for it. Don't want to delay this one. |
ChrisChV
left a comment
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.
Looks good! Great work!


Description
Useful information to include:
"Developer", and "Operator".
2025-05-30.11-57-52.mp4
Supporting information
Private-ref: https://tasks.opencraft.com/browse/FAL-4164Testing instructions
Other information
Include anything else that will help reviewers and consumers understand the change.