[WIKI-523] refactor: assets item component#7346
Conversation
WalkthroughThe changes update how page names are displayed in a breadcrumb navigation dropdown by applying a utility function, and extend asset item props with two new string properties for asset sources. Additionally, asset URL generation in a component is refactored to use memoized values, and these URLs are now passed as props to a child component. The constant for a query parameter key was also renamed. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant BreadcrumbDropdown
participant getPageName
User->>BreadcrumbDropdown: Open navigation dropdown
BreadcrumbDropdown->>getPageName: Call with page?.name
getPageName-->>BreadcrumbDropdown: Returns formatted page name
BreadcrumbDropdown-->>User: Display formatted page name in title
sequenceDiagram
participant AssetItem
participant useMemo
participant AdditionalAssetItem
AssetItem->>useMemo: Compute assetSrc and assetDownloadSrc
useMemo-->>AssetItem: Return memoized URLs
AssetItem->>AdditionalAssetItem: Pass assetSrc and assetDownloadSrc as props
AdditionalAssetItem-->>AssetItem: Render asset with provided URLs
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Pull Request Linked with Plane Work Items
Comment Automatically Generated by Plane |
Description
This PR refactors the asset item component in page navigation pane.
Type of Change
Summary by CodeRabbit
New Features
Refactor