Dyn 10225 add default placeholder images in dynamo app home#71
Open
Chloepeg wants to merge 13 commits intoDynamoDS:masterfrom
Open
Dyn 10225 add default placeholder images in dynamo app home#71Chloepeg wants to merge 13 commits intoDynamoDS:masterfrom
Chloepeg wants to merge 13 commits intoDynamoDS:masterfrom
Conversation
- Enhance CustomDropdown component to support divider and header option types - Add template options to Sidebar "New" dropdown with visual grouping - Add template data structure in home.ts assets - Update dropdown styling for divider and header elements - Add TypeScript types for dropdown option kinds (item/divider/header) - Update package dependencies
- Add Templates section above Recent section on home page - Implement templates data loading from home.ts (dev) and backend (prod) - Add independent grid/list view toggle for Templates section - Add templatesPageViewMode setting for view preference persistence - Map template data structure (date -> DateModified) for component compatibility - Add receiveTemplatesDataFromDotNet window function for backend integration - Add "Templates" translation key to locale files - Reuse existing GraphGridItem and GraphTable components for templates display
…down - Add newWorkspaceWithTemplate utility function - Implement listener pattern for template data sharing between Sidebar and PageRecent - Map hardcoded dropdown options to real template files from backend - Update TypeScript types for listener pattern
- Add TemplatesContext to manage template state centrally - Update Sidebar and PageRecent to use useTemplates() hook - Remove duplicate global handlers to prevent race conditions - Aligns with existing React patterns
Update template matching logic to use new filenames: - Template 1: matches 'Create a Graph.dyn' (was Template_00_) - Template 2: matches 'Import & Export Workflow.dyn' (was Template_01_)
Drop down menu on side panel removed, will be added back later - Remove Template 1 and Template 2 options from Sidebar dropdown - Remove newWorkspaceWithTemplate function from utility.ts - Remove divider/header support from CustomDropdown component - Remove template data from home.ts assets - Update type definitions to remove template-related types
TemplatesContext requires templates export in development mode
Fix module path in TemplatesContext.tsx and restore package-lock.json metadata.
Display Recent files section above Templates section on the home page. Visual reordering only, there is no functional changes to either section
Add info icon with tooltip to the Templates section title that appears when hovering over the Template heading Changes: - Add tooltip component to Templates title in PageRecent.tsx - Add tooltip text to locale file (en.json) - Extend Tooltip component to support right-side positioning with arrow - Update tooltip styling for wider layout to fit space inbetween - Position tooltip to the right of the title with left-pointing arrow
- Add QuestionMarkIcon import to PageRecent component - Tooltip now appears when hover over the icon instead of the header - Text updated
…e missing, showing file-type-specific icons (.dyn, .dyt, .dyf) Add placeholder icon assets for .dyn, .dyt, and .dyf file types - Create placeholder utility function to select icon based on file extension - Update GraphGridItem to use placeholder images when thumbnails are missing - Update CustomNameCellRenderer to use placeholder images in table view
Fix placeholder icons in GraphGridItem to match CustomNameCellRenderer pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR addresses DYN-10225 https://jira.autodesk.com/browse/DYN-10225
The changes in the code aim to show placeholder icons for graphs/templates without custom thumbnails. It checks if the thumbnail is empty, null, then select the correct icon by file extension (.dyn, .dyf, and ( future .dyt)
Changes :
Added import for getPlaceholderImage from ../../functions/placeholder
Added import for img from ../../assets/home
Added logic to detect custom thumbnails vs default/empty thumbnails
Updated imageSrc to use getPlaceholderImage(ContextData) when no custom thumbnail is present
This PR should be merged after DYN-10191
Declarations
Check these if you believe they are true
[ ] Is documented according to the standards
[ ] The level of testing this PR includes is appropriate
[ ] Changes to the API follow Semantic Versioning and are documented in the API Changes document.
### Release Notes
Graphs and templates without custom thumbnails now display appropriate placeholder icons. The icon is selected based on file extension (.dyn, .dyf, ( or future .dyt)
Reviewers
@zeusongit
@DynamoDS/eidos
FYIs
@dnenov
@johnpierson