Skip to content

Conversation

@juanjofgliferay
Copy link
Collaborator

Followup #5175

Story / Task

LPD-9465 / LPD-59387

Warning

In the FDS Sample Custom Views, Config in URL and Active View Settings may clash and return unexpected results.
If you want to test Custom/User Views in the FDS Sample it is better to start with a fresh DB or remove the corresponding ActiveViewSettingsJSON rows from the PortalPreferenceValue table.

Tip

To test this feature we need to update a given Data Set and set customViewsEnabled to true. This can be done throug API Explorer using the Data Sets API /by-external-reference-code/{externalReferenceCode} PATCH with {"snapshotsEnabled": true} body.
To ease testing, it is possible to enable custom views via UI with LPD-10683 feature flag turned on.

Goal

Allows end-users to create, edit and delete customized versions of admin views.
Aspects that can be saved as part of the custom view:

  • Visualization Mode
  • To be done in next Story:
  • Pagination delta
  • Filters applied
  • Current sorting
  • Visualization Mode
  • Columns shown

UI

Screencast.From.2025-11-20.13-01-15.mp4

Tests

FDS web

fds-web-test

FDS admin web

fds-admin-web-test

@liferay-continuous-integration
Copy link
Collaborator

CI is automatically triggering the following test suites:

  •     ci:test:sf

@juanjofgliferay juanjofgliferay requested review from dsanz and removed request for liferay-frontend December 5, 2025 12:43
@liferay-continuous-integration
Copy link
Collaborator

Test suite sf has been triggered on http://test-1-37

@gemini-code-assist
Copy link

Summary of Changes

Hello @juanjofgliferay, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience by introducing 'Snapshots' for data sets, enabling users to save and manage their personalized view configurations. This includes persisting various display and interaction settings such as visualization modes, pagination, filters, sorting, and column visibility. The implementation involved a comprehensive overhaul of both backend and frontend components, migrating from a preference-based storage system to a more robust Object Entry API for custom views, and integrating a new snapshotsEnabled property. Frontend components were updated to reflect these changes, providing a seamless UI for snapshot management and ensuring data integrity through immutable state updates.

Highlights

  • Custom Views (Snapshots) Feature: Introduced the ability for end-users to create, edit, and delete customized versions of data set views, now referred to as 'Snapshots'. This allows users to save their preferred configurations, including visualization mode, pagination delta, applied filters, current sorting, and visible columns.
  • Backend Implementation: Added a new DataSetSnapshot object definition to store custom view configurations and a snapshotsEnabled boolean property to data sets. The backend now uses the Object Entry API for managing these snapshots, deprecating older PortalPreferences-based custom view logic.
  • Frontend UI Updates: Implemented the user interface for managing snapshots, including dropdowns and actions for saving, renaming, and deleting views. The customViewsEnabled property and related frontend logic have been replaced with snapshotsEnabled.
  • Code Refactoring and Utility: Refactored frontend state management to use immutable updates with a new deepClone utility function, ensuring that state changes are handled cleanly and predictably across the application.
  • Feature Flag Integration: The new 'User Views' functionality is controlled by the LPD-10683 feature flag, allowing for staged rollout and testing.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant and well-executed refactoring of the "Custom Views" feature, now termed "Snapshots". The core change is migrating the storage mechanism from Portal Preferences to a more robust Liferay Object-based solution, which is a great architectural improvement. The changes are comprehensive, spanning the backend, frontend, and tests. Key highlights include the new DataSetSnapshot object, new Vulcan REST endpoints, and a refactored frontend with improved state management using a new deepClone utility for immutability. The PR also includes valuable bug fixes for client extension loading and filter state management, and is accompanied by thorough new Playwright tests. The overall quality of the implementation is high. I have one minor suggestion to improve the serialization of snapshot data.

).put(
"erc", objectEntry.getExternalReferenceCode()
).put(
"label", String.valueOf(properties.get("label"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using String.valueOf() on a potentially null object will result in the string literal "null". This is likely not what the frontend expects. It's better to pass the raw object from properties.get("label") to JSONUtil.put(), which will correctly serialize a null value to JSON null.

Suggested change
"label", String.valueOf(properties.get("label"))
"label", properties.get("label")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Not sure. I'm using the same pattern used in other FDS places

@liferay-continuous-integration
Copy link
Collaborator

✔️ ci:test:sf - 1 out of 1 jobs passed in 5 minutes

Ran com.liferay.source.formatter at released version 1.0.1554.
*The latest version has not been released.

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 098e3f6b6ac8fe2118aea5b168764437f132a628

Sender Branch:

Branch Name: LPD-9465.v2
Branch GIT ID: 753715bd36bd337ed05bb76e1e7ed68a3554e4dc

1 out of 1 jobs PASSED
1 Successful Jobs:
For more details click here.

@liferay-continuous-integration
Copy link
Collaborator

@liferay-continuous-integration
Copy link
Collaborator

✔️ ci:test:sf - 1 out of 1 jobs passed in 5 minutes

Ran com.liferay.source.formatter at released version 1.0.1554.
*The latest version has not been released.

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 87375166c280a738a4229cb80eeb32eb1a7b8c67

Sender Branch:

Branch Name: LPD-9465.v2
Branch GIT ID: 6735b5207971533c396f44f928d72f89768a6147

1 out of 1 jobs PASSED
1 Successful Jobs:
For more details click here.

@liferay-continuous-integration
Copy link
Collaborator

@juanjofgliferay
Copy link
Collaborator Author

ci:test:frontend-data-set

@liferay-continuous-integration
Copy link
Collaborator

Test suite frontend-data-set has been triggered on http://test-1-36

@dsanz
Copy link
Collaborator

dsanz commented Dec 5, 2025

ci:test:relevant

@liferay-continuous-integration
Copy link
Collaborator

Test suite relevant has been triggered on http://test-1-31

@dsanz
Copy link
Collaborator

dsanz commented Dec 5, 2025

ci:test:stable

@liferay-continuous-integration
Copy link
Collaborator

Test suite stable has been triggered on http://test-1-31

@liferay-continuous-integration
Copy link
Collaborator

❌ ci:test:frontend-data-set - 3 out of 6 jobs passed in 1 hour 17 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 87375166c280a738a4229cb80eeb32eb1a7b8c67

Upstream Comparison:

Branch GIT ID: a163b9f2d7cc0f85f5b4a10250cedf5b739c5988
Jenkins Build URL: EE Development Acceptance (master) - 2 - 2025-12-01[20:40:15]

ci:test:frontend-data-set - 3 out of 6 jobs PASSED
3 Successful Jobs:
    For more details click here.

    Failures unique to this pull:

    For upstream results, click here.

    Test bundle downloads:

    @liferay-continuous-integration
    Copy link
    Collaborator

    @liferay-continuous-integration
    Copy link
    Collaborator

    @liferay-continuous-integration
    Copy link
    Collaborator

    @liferay-continuous-integration
    Copy link
    Collaborator

    ✔️ ci:test:stable - 12 out of 12 jobs passed

    ❌ ci:test:relevant - 17 out of 25 jobs passed in 2 hours 46 minutes

    Click here for more details.

    Base Branch:

    Branch Name: master
    Branch GIT ID: 87375166c280a738a4229cb80eeb32eb1a7b8c67

    Upstream Comparison:

    Branch GIT ID: f107373318f0a3024a15a3849c857a4d53259545
    Jenkins Build URL: EE Development Acceptance (master) - 277 - 2025-11-21[04:37:40]

    ci:test:stable - 12 out of 12 jobs PASSED
    12 Successful Jobs:
      ci:test:relevant - 17 out of 25 jobs PASSED

      8 Failed Jobs:

      17 Successful Jobs:
        For more details click here.

        Failures unique to this pull:

        1. modules-integration-postgresql163/0/0
          [beanshell] 
          [beanshell] Executing commands: git clean -dfx
          [beanshell] 
          [beanshell] commit 1e7091413da9107d559bb569ad2b5f8cbfd312d1
          [beanshell] Author: Brian Chan <brian.chan@liferay.com>
          [beanshell] Date:   Tue Dec 2 18:11:06 2025 -0800
          [beanshell] 
          [beanshell]     LPD-73038 SF
          [beanshell] 
          [beanshell] Executing commands: git branch | grep \*
          [beanshell] Executing commands: git for-each-ref refs/heads --format="%(refname)"
          [beanshell] Executing commands: git branch | grep \*
          [beanshell] Executing commands: git log -n 1
          [beanshell] Executing commands: git for-each-ref refs/heads --format="%(refname)"
          [beanshell] Executing commands: git clean -dfx
          [beanshell] Executing commands: git clean -dfx
          [beanshell] 
          [beanshell] commit 34b86ec50cedba4082671f7b14652afca36b49f1
          [beanshell] Author: Liferay Continuous Integration <continuous-integration@liferay.com>
          [beanshell] Date:   Thu Dec 4 02:41:26 2025 -0800
          [beanshell] 
          [beanshell]     Commit cache
          [beanshell] 
          [beanshell] Executing commands: git log -n 1
          [beanshell] 
          [beanshell] commit eef8f68f6d4cb9607a6c7047ec3eae8eaebc2363
          [beanshell] Author: Liferay Continuous Integration <continuous-integration@liferay.com>
          [beanshell] Date:   Tue Dec 2 18:47:20 2025 -0800
          [beanshell] 
          [beanshell]     subrepo:ignore Update 'modules/dxp/apps/osb/osb-asah/.gitrepo'.
          [beanshell] 
          [beanshell] Executing commands: git branch | grep \*
          [beanshell] Executing commands: git branch | grep \*
          [beanshell] Executing commands: git for-each-ref refs/heads --format="%(refname)"
          [beanshell] Executing commands: git for-each-ref refs/heads --format="%(refname)"
          [beanshell] Executing commands: git log -n 1
          [beanshell] Executing commands: git log -n 1
          [beanshell] 
          [beanshell] commit 3274ff03d23ada9bded2d522bbdc6cfedad1358f
          [beanshell] Author: shuyangzhou <shuyang.zhou@liferay.com>
          [beanshell] Date:   Tue Dec 2 11:54:54 2025 -0800
          [beanshell] 
          [beanshell]     LPD-73164 Apply index cache to DLFileEntryImpl
          [beanshell] 
          [beanshell] 
          [beanshell] commit 3274ff03d23ada9bded2d522bbdc6cfedad1358f
          [beanshell] Author: shuyangzhou <shuyang.zhou@liferay.com>
          [beanshell] Date:   Tue Dec 2 11:54:54 2025 -0800
          [beanshell] 
          [beanshell]     LPD-73164 Apply index cache to DLFileEntryImpl
          [beanshell] 
          [beanshell] ParallelExecutor 1 - tearDown completed 15 tasks in 3 seconds averaging 1 second per task. 
          [stopwatch] [stop.current.job: 7.945 sec]
          

          BUILD SUCCESSFUL
          Total time: 10 seconds

          • echo 'Exit shell.'
            Exit shell.
            Finished: FAILURE
        2. ...

        For upstream results, click here.

        Test bundle downloads:

        @liferay-continuous-integration
        Copy link
        Collaborator

        Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

        Projects

        None yet

        Development

        Successfully merging this pull request may close these issues.

        3 participants