Skip to content

Conversation

@chestofwonders
Copy link
Collaborator

Issue: https://liferay.atlassian.net/browse/LPD-70127

Create FDSCard component based on ClayCardWithInfo

The goal of this PR is to create a new card component called FDSCard, based on ClayCardWithInfo.

The component acts as a wrapper around ClayCard, adapted to FDS requirements, and implements Actions menu, as used in Table views.

⚠️ Things to notice:

  • All of Clay's HOCs have been removed, except for Description, which includes necessary logic. You could either keep it as an HOC and move it elsewhere as a reusable component, or create the Description component within FDSCard and use it in the render.
  • The getDropdownActions function contains a mix of logic that is added further down in Actions (and would therefore be duplicated), along with other logic that we want to keep. A minor refactoring of the function would need to be considered.
  • The contract between Cards and FDSCard needs to be reviewed, because it contains properties that have become obsolete or are Clay dependencies that we don't want to maintain.

@liferay-continuous-integration
Copy link
Collaborator

CI is automatically triggering the following test suites:

  •     ci:test:sf

@liferay-continuous-integration
Copy link
Collaborator

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

@liferay-continuous-integration
Copy link
Collaborator

❌ ci:test:sf - 0 out of 1 jobs passed in 4 minutes

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

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 0e69ede7b0c0859b969575bfbc2fceb109371b7b

Sender Branch:

Branch Name: LPD-70127
Branch GIT ID: 60966d6ac876474b50ef0916d04ca73633c62ea2

0 out of 1 jobs PASSED
For more details click here.
     [exec] > Task :packageRunCheckFormat
     [exec] yarn run v1.22.22
     [exec] \$ node-scripts check:ci
     [exec] 
     [exec] ⚙️ Running preflight checks...
     [exec] 
     [exec] ⚙️ Checking outdated tsconfig.json files ...
     [exec] 
     [exec] ⚙️ Running TypeScript checks on modified files...
     [exec] ℹ️ A total of 12 CPUs were detected: launching tsc using 12 workers
     [exec] ✅ Checked apps/frontend-data-set/frontend-data-set-web
     [exec] 
     [exec] ⚙️ Running format checks on modified files...
     [exec]    /opt/dev/projects/github/liferay-portal/modules/apps/frontend-data-set/frontend-data-set-web/src/main/resources/META-INF/resources/views/cards/Cards.tsx
     [exec]      138:15  error  'getDropdownActions' is assigned a value but never used. Allowed unused vars must match /^_/u.  @typescript-eslint/no-unused-vars
     [exec]    
     [exec]    ✖ 1 problem (1 error, 0 warnings)
     [exec]    
     [exec]    /opt/dev/projects/github/liferay-portal/modules/apps/frontend-data-set/frontend-data-set-web/src/main/resources/META-INF/resources/views/cards/Description.tsx
     [exec]      23:2  error  Member "disabled" should be declared before member "displayType".  @typescript-eslint/member-ordering
     [exec]    
     [exec]    ✖ 1 problem (1 error, 0 warnings)
     [exec]    
     [exec]    /opt/dev/projects/github/liferay-portal/modules/apps/frontend-data-set/frontend-data-set-web/src/main/resources/META-INF/resources/views/cards/FDSCard.tsx
     [exec]      43:2  error  Member "description" should be declared before member "radioProps".  @typescript-eslint/member-ordering
     [exec]      135:2  error  Member "onSelectChange" should be declared before member "truncate".  @typescript-eslint/member-ordering
     [exec]      143:1  error  Use named function for export instead of arrow function. Example: 'function fooBar() \{\}'  @liferay/no-anonymous-exports
     [exec]      150:2  error  'dropDownTriggerProps' is assigned a value but never used. Allowed unused vars must match /^_/u.  @typescript-eslint/no-unused-vars
     [exec]      159:2  error  'itemScope' is defined but never used. Allowed unused args must match /^_|^this\$/u.  @typescript-eslint/no-unused-vars
     [exec]    
     [exec]    ✖ 5 problems (5 errors, 0 warnings)
     [exec]    
     [exec]    
     [exec] ❌ CI checks failed.
     [exec] error Command failed with exit code 1.

@liferay-continuous-integration
Copy link
Collaborator

@markocikos
Copy link
Collaborator

Closing, as refactor is not needed. See https://liferay.slack.com/archives/C3JBR21HA/p1764860479598819

@markocikos markocikos closed this Dec 5, 2025
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