Fix default view widget visibility (#21590)
Tim logged on the left, Phil on the right, Tim created view widget ## Before <img width="1512" height="938" alt="image" src="https://github.com/user-attachments/assets/7f993f41-a244-42db-b56a-b17c15fb3409" /> ## After Fix Tim created a second view widget, Phil can see it <img width="1512" height="982" alt="image" src="https://github.com/user-attachments/assets/3908a70d-538b-4adf-95df-7373a2f6e269" /> ## After slow migration Phil can see first widget <img width="1512" height="982" alt="image" src="https://github.com/user-attachments/assets/6b30429e-1acf-4119-ba32-26db3155975e" /> <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/21590?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
import { buildRecordTableWidgetViewSnapshot } from '@/page-layout/widgets/record-table/utils/buildRecordTableWidgetViewSnapshot';
|
||||
import { ViewVisibility } from '~/generated-metadata/graphql';
|
||||
import { getMockObjectMetadataItemOrThrow } from '~/testing/utils/getMockObjectMetadataItemOrThrow';
|
||||
|
||||
describe('buildRecordTableWidgetViewSnapshot', () => {
|
||||
const objectMetadataItem = getMockObjectMetadataItemOrThrow('company');
|
||||
|
||||
it('should create the widget view with WORKSPACE visibility so it is shared with all workspace members', () => {
|
||||
const { view } = buildRecordTableWidgetViewSnapshot(objectMetadataItem);
|
||||
|
||||
expect(view.visibility).toBe(ViewVisibility.WORKSPACE);
|
||||
});
|
||||
});
|
||||
+1
-1
@@ -28,7 +28,7 @@ export const buildRecordTableWidgetViewSnapshot = (
|
||||
isCompact: false,
|
||||
position: 0,
|
||||
openRecordIn: ViewOpenRecordIn.RECORD_PAGE,
|
||||
visibility: ViewVisibility.UNLISTED,
|
||||
visibility: ViewVisibility.WORKSPACE,
|
||||
shouldHideEmptyGroups: false,
|
||||
isActive: true,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user