[frontend/backend] Display custom views tab(s) (#13389)#15343
[frontend/backend] Display custom views tab(s) (#13389)#15343fellowseb wants to merge 12 commits intoissue/13389-custom-viewsfrom
Conversation
f8f1509 to
c70d27e
Compare
916fae8 to
7be583e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## issue/13389-custom-views #15343 +/- ##
============================================================
+ Coverage 33.17% 33.27% +0.10%
============================================================
Files 3156 3166 +10
Lines 214202 214406 +204
Branches 39135 39161 +26
============================================================
+ Hits 71055 71350 +295
+ Misses 143147 143056 -91
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c70d27e to
7e8927c
Compare
| {shouldDisplayCustomViewTab ? ( | ||
| <Tab | ||
| component={Link} | ||
| to={customViews[0].path} | ||
| value={CUSTOM_VIEW_TAB_VALUE} | ||
| label={customViews[0].name} | ||
| /> | ||
| ) : null} |
There was a problem hiding this comment.
When a single custom view is available, the Tab component's to property should prepend the basePath to the custom view path, matching the pattern used in the dropdown menu items (line 121). Currently, the link will not work correctly when navigating to the custom view because the basePath is omitted.
| const parsedManifest: DashboardManifest = JSON.parse(manifest ? fromB64(manifest) : '{}'); | ||
| const { widgets, config } = parsedManifest; |
There was a problem hiding this comment.
When parsing an empty manifest (when manifest is null/undefined), the code uses JSON.parse('{}') which creates an object without the config and widgets properties required by DashboardManifest. While the code has defensive checks for undefined values (line 65), the type assertion on line 41 is incorrect. Consider using the deserializeDashboardManifestForFrontend utility function which properly handles empty manifests, or explicitly construct the proper structure.
| } as const; | ||
|
|
||
| const ARROW_STYLE = { | ||
| fontStyle: '20px', |
There was a problem hiding this comment.
The CSS property should be fontSize instead of fontStyle. The fontStyle property is used for specifying italic, normal, or oblique styles, not for setting font size. The correct property is fontSize: '20px'.
| fontStyle: '20px', | |
| fontSize: '20px', |
7e8927c to
ba8cbc1
Compare
7be583e to
129f9f2
Compare
1a1e42b to
e79e7a1
Compare
ba8cbc1 to
2b10314
Compare
086f64b to
1610e64
Compare
1610e64 to
1a45852
Compare
1a45852 to
15c1eda
Compare
Proposed changes
Implements chunk
Users can view a and navigate to a "Custom views" tab on entities pagesof the "Custom views" featureA custom view is a dashboard an administrator creates for a given entity type. This dashboard is then viewable (not editable) by "normal" users.
User journeys
path(/[slug]-[id-without-dashes]) and displays its content.Custom viewstab appear on the SDO page. Clicking on the tab displays a drop-down menu with an item per custom view. Clicking on the menu items reroutes the user to the custom viewpath(/[slug]-[id-without-dashes]) and displays its content.Enregistrement.de.l.ecran.2026-04-02.a.11.40.14.mov
Specs
Figma: https://www.figma.com/design/K2TFfOTI4MBgWzIyGT2AHV/Custom-views?node-id=119-150&t=y1ubGmkFiRj9H8fl-0
Notion: https://www.notion.so/filigran/New-TAB-with-a-custom-knowledge-view-2b18fce17f2a80f09a34db26a15ff8d1
Details
Frontend
useTabWithDropDownhook that returns two components separately, for case 2: the returned Tab and the DropDown. Seems a little awkward but I had to do that given returning either a Fragment or an array of both elements under the<Tabs>component lead to styles not applied to the Tab.DashboardManifestandDashboardConfigto be reused in all places using dashboards (Dashboards, Public Dashboards & Custom views)Custom viewstringBackend
Data model changes:
pathproperty to the custom view entity type and expose it in the API. This will be a concatenation of a slug (from thename) with its ID, and is used in the URL bar of the user, it's a path à la Notion that allows changing the name/slug while still being able to open an old link.target_entity_typeto CustomView entities to tell which entities are concerned by this custom viewRelated issues
Manual testing
Feature branch deployment available here : https://feat-issue-13389-2-c.octi.staging.filigran.io/ .
Use "feat-issue-13389-2-c" credentials in 1Password.
Connect as
customers@filigran.io.To test case 1: go to a
Campaignpage. You should see a single custom view tab.To test case 2 go to a
Intrusion Setpage. You should see two custom views under a dropdown tab.Checklist
Further comments