Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtered Rows and Columns in variables list #26196

Merged
merged 2 commits into from Sep 25, 2023

Conversation

KevinDavilaDotCMS
Copy link
Contributor

@KevinDavilaDotCMS KevinDavilaDotCMS commented Sep 20, 2023

πŸ€– Generated by Copilot at 07b0f3a

Summary

πŸ—ΊοΈπŸš°πŸ“

Improved container code editor to allow filtering variables by fieldType. Modified dot-add-variable.component.ts to use map operator for filtering.

map operator filters
container variables by
fieldType - autumn code

Walkthrough

  • Filter out column and row variables from the container code editor (link)
  • Import map operator from rxjs to transform the store data (link)

Additional Info

** any additional useful context or info **

Screenshots

Original Updated
** original screenshot ** ** updated screenshot **

(variable) => variable.fieldType !== 'Column' && variable.fieldType !== 'Row'
);

return { variables: variables };
Copy link
Contributor

Choose a reason for hiding this comment

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

return { variables }

Copy link
Member

Choose a reason for hiding this comment

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

+1

vm$ = this.store.vm$.pipe(
map((res) => {
const variables = res.variables.filter(
(variable) => variable.fieldType !== 'Column' && variable.fieldType !== 'Row'
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should do an enum for Column/Row

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, can we add a test for this filter?

Copy link
Member

Choose a reason for hiding this comment

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

+1

vm$ = this.store.vm$.pipe(
map((res) => {
const variables = res.variables.filter(
(variable) => variable.fieldType !== 'Column' && variable.fieldType !== 'Row'
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, can we add a test for this filter?

vm$ = this.store.vm$.pipe(
map((res) => {
const variables = res.variables.filter(
(variable) => variable.fieldType !== 'Column' && variable.fieldType !== 'Row'
Copy link
Member

Choose a reason for hiding this comment

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

+1

(variable) => variable.fieldType !== 'Column' && variable.fieldType !== 'Row'
);

return { variables: variables };
Copy link
Member

Choose a reason for hiding this comment

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

+1

Copy link
Contributor

@rjvelazco rjvelazco left a comment

Choose a reason for hiding this comment

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

Some changes have been requested

@dotcms-sonarqube
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@fmontes fmontes merged commit 7357e72 into master Sep 25, 2023
20 checks passed
@fmontes fmontes deleted the fix/remove-columns-and-row-containers-portlet branch September 25, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Containers]: Fix Container Content Types Variable List Showing Rows and Columns
4 participants