Skip to content

Conversation

@rismehta
Copy link
Collaborator

@review @vdua
DOD(Yes)

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

@adobe-bot
Copy link

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 100 100 73

@adobe-bot
Copy link

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 92 100 100 73

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

2 similar comments
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

@codecov
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.75%. Comparing base (c94da71) to head (c587579).

Additional details and impacted files
@@            Coverage Diff            @@
##                dev    #1180   +/-   ##
=========================================
  Coverage     80.75%   80.75%           
  Complexity      773      773           
=========================================
  Files            91       91           
  Lines          2110     2110           
  Branches        285      285           
=========================================
  Hits           1704     1704           
  Misses          252      252           
  Partials        154      154           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rismehta rismehta merged commit 64d220a into dev Apr 10, 2024
@rismehta rismehta deleted the datepicker2 branch April 10, 2024 10:44
if (this.widgetObject.getValue() !== '') {
this._model.value = this.widgetObject.getValue();
if (this.isActive()) {
this.widgetObject.setValue(model.value);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we setting widget value in setting of model? Ideally this should be the job of updateValue not setModel
Earlier model value was being set via widget, you have al together removed that code..

Copy link
Collaborator Author

@rismehta rismehta Apr 10, 2024

Choose a reason for hiding this comment

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

Earlier model value was being set via widget, you have al together removed that code

It was redundant because the model value is already established upon initializing the datePickerWidget. If you observe the third argument, it contains the model.

In the setModel function, the model already possesses the correct value from af-core. Consequently, setting the value again within the model was redundant, as the value remained unchanged, and updateState was not invoked in this context.

Ideally this should be the job of updateValue not setModel

Ideally, we should utilize updateValue. However, during prefill/initialize, updateValue lacks initialization of the widgetObject, resulting in failure. Although I considered making this change of initializing widgetObject in updateValue like we do in number input but it would require significant refactoring, which isn't necessary at this juncture.

Copy link
Contributor

@sakshi-arora1 sakshi-arora1 Apr 10, 2024

Choose a reason for hiding this comment

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

Can you open a JIRA to correct this flow, to align with other views. And do link that JIRA to the original issue so it could be tracked.

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.

5 participants