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

dotCMS/core#24163 [Containers] : Clicking up or down arrows in Max Contents field is not working #24177

Conversation

zulqarnainvd
Copy link
Contributor

Proposed Changes

  • show or hide content type on clicking on up or down arrow on max content field

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Additional Info

** any additional useful context or info **

Screenshots

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

@zulqarnainvd
Copy link
Contributor Author

screen-capture.10.webm

@zulqarnainvd
Copy link
Contributor Author

screen-capture.9.webm

@zulqarnainvd
Copy link
Contributor Author

updated

@@ -54,8 +54,7 @@ export class DotContainerPropertiesComponent implements OnInit, AfterViewInit {
title: new FormControl(container?.title ?? '', [Validators.required]),
friendlyName: new FormControl(container?.friendlyName ?? ''),
maxContentlets: new FormControl(container?.maxContentlets ?? 0, {
validators: [Validators.required],
updateOn: 'blur'
validators: [Validators.required]
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a way to test this?

Copy link
Member

Choose a reason for hiding this comment

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

Is this going to be triggered on every change of the field? is so... we need to catch that somehow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, Noted

Copy link
Member

Choose a reason for hiding this comment

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

@zulqarnainvd Isn't this updating the UI several time after it goes from 1 to 2 and 3 etc? I mean... we should only change tha state when 0 or 1. Can you double check that?

@@ -54,8 +54,7 @@ export class DotContainerPropertiesComponent implements OnInit, AfterViewInit {
title: new FormControl(container?.title ?? '', [Validators.required]),
friendlyName: new FormControl(container?.friendlyName ?? ''),
maxContentlets: new FormControl(container?.maxContentlets ?? 0, {
validators: [Validators.required],
updateOn: 'blur'
validators: [Validators.required]
Copy link
Member

Choose a reason for hiding this comment

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

Is this going to be triggered on every change of the field? is so... we need to catch that somehow.

@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

@@ -54,8 +54,7 @@ export class DotContainerPropertiesComponent implements OnInit, AfterViewInit {
title: new FormControl(container?.title ?? '', [Validators.required]),
friendlyName: new FormControl(container?.friendlyName ?? ''),
maxContentlets: new FormControl(container?.maxContentlets ?? 0, {
validators: [Validators.required],
updateOn: 'blur'
validators: [Validators.required]
Copy link
Member

Choose a reason for hiding this comment

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

@zulqarnainvd Isn't this updating the UI several time after it goes from 1 to 2 and 3 etc? I mean... we should only change tha state when 0 or 1. Can you double check that?

@zulqarnainvd
Copy link
Contributor Author

@fmontes I checked old container you can type any number you want. On the other hand it is only update the store when previous Max Contents greater than zero or previous value null. I added a screenshot below so you can verify.

image
image

@fmontes fmontes merged commit 90fc9db into master Feb 28, 2023
@fmontes fmontes deleted the 24163-containers-clicking-up-or-down-arrows-in-max-contents-field-is-not-working branch February 28, 2023 20:43
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] : Clicking up or down arrows in Max Contents field is not working
4 participants