Commit 2adc45b
Dyn 10225 add default placeholder images in dynamo app home (#71)
* Add template files support to New dropdown
- 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 to home page
- 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
* Open templates in a new editable workspace from template sidebar dropdown
- 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
* template data to use React Context
- 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 sidebar to match renamed template files
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
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
* fix development build
TemplatesContext requires templates export in development mode
* Fix build errors
Fix module path in TemplatesContext.tsx and restore package-lock.json metadata.
* Swap Recent and Templates order on home page
Display Recent files section above Templates section on the home page.
Visual reordering only, there is no functional changes to either section
* Add tooltip to Templates heading
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
* Move Templates tooltip to question mark icon
- Add QuestionMarkIcon import to PageRecent component
- Tooltip now appears when hover over the icon instead of the header
- Text updated
* Adds default placeholder images for template files when thumbnails are 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 icon display in GraphGridItem
Fix placeholder icons in GraphGridItem to match CustomNameCellRenderer pattern
* Update src/components/Common/Tooltip.tsx
Remove unused arrowDirection from Tooltip
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Address PR feedback
Remove duplicate declare module "*.module.css" entry.
Narrow Tooltip position type to 'right' only; default placement is unchanged (below the anchor). 'below' was redundant in the type.
Add HomeTemplate in types/index.d.ts and type TemplatesContext / useTemplates() accordingly.
Centralize template date display in templateDateDisplay (date vs DateModified); behaviour unchanged.
Deduplicate list row click: Recent and Templates share handleRowClick.
* Settings persistence pr comments
Changes :
Stale snapshots when saving : updateAndSaveSettings builds the next object inside setSettings(prev => …) and calls saveHomePageSettings on that merged object, so save: are not based on an outdated settings closure.
Sidebar width Resize uses updateAndSaveSettings; the old “save in a useEffect off sideBarWidth” path that could race with context is gone.
Recent / templates / samples view modes : Persistence goes through updateAndSaveSettings, templates use the same “local vs prop” idea as recent so the first toggle isn’t blocked, and templates get a defaulted prop from MainContent.
No stray saveHomePageSettings in components : It only runs from SettingsContext inside updateAndSaveSettings.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent f8a00b0 commit 2adc45b
23 files changed
Lines changed: 367 additions & 87 deletions
File tree
- src
- assets
- components
- Common
- Recent
- Samples
- Sidebar
- functions
- locales
- types
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
Loading
Loading
Loading
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
31 | 63 | | |
32 | 64 | | |
33 | | - | |
| 65 | + | |
34 | 66 | | |
35 | 67 | | |
36 | | - | |
| 68 | + | |
37 | 69 | | |
38 | 70 | | |
39 | 71 | | |
40 | 72 | | |
41 | 73 | | |
42 | 74 | | |
43 | | - | |
| 75 | + | |
44 | 76 | | |
45 | 77 | | |
46 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
0 commit comments