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

fix: 6842 added property firstDayOfWeek #9497

Merged
merged 8 commits into from
Dec 29, 2021

Conversation

vibhandikyash
Copy link
Contributor

@vibhandikyash vibhandikyash commented Dec 1, 2021

Description

Added a new property for First Day of week.

Fixes #6842

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Tested locally.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Test coverage results 🧪

🔴 Total coverage has decreased
// Code coverage diff between base branch:release and head branch: fix/firstdayofweek-datepicker-widget 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 55.04 (-0.01) 36.48 (-0.01) 34.45 (0) 55.57 (-0.01)
🔴 app/client/src/utils/WorkerUtil.ts 89.76 (0) 70.59 (-1.96) 100 (0) 93.33 (0)
🔴 app/client/src/widgets/DatePickerWidget2/component/index.tsx 27.78 (0) 2.99 (-0.09) 6.25 (0) 27.14 (0)
🔴 app/client/src/widgets/DatePickerWidget2/widget/index.tsx 76.67 (-7.95) 0 (0) 66.67 (-8.33) 78.57 (-8.93)

@vibhandikyash vibhandikyash added the App Viewers Pod This label assigns issues to the app viewers pod label Dec 1, 2021
@vibhandikyash vibhandikyash self-assigned this Dec 1, 2021
@vibhandikyash
Copy link
Contributor Author

/ok-to-test sha=777c050

@github-actions github-actions bot added the Bug Something isn't working label Dec 1, 2021
@github-actions
Copy link

github-actions bot commented Dec 1, 2021

Unable to find test scripts. Please add necessary tests to the PR.

4 similar comments
@github-actions
Copy link

github-actions bot commented Dec 1, 2021

Unable to find test scripts. Please add necessary tests to the PR.

@github-actions
Copy link

github-actions bot commented Dec 1, 2021

Unable to find test scripts. Please add necessary tests to the PR.

@github-actions
Copy link

github-actions bot commented Dec 1, 2021

Unable to find test scripts. Please add necessary tests to the PR.

@github-actions
Copy link

github-actions bot commented Dec 1, 2021

Unable to find test scripts. Please add necessary tests to the PR.

@github-actions
Copy link

github-actions bot commented Dec 1, 2021

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1525315814.
Workflow: Appsmith External Integration Test Workflow.
Commit: 777c050.
PR: 9497.

@vibhandikyash
Copy link
Contributor Author

/ok-to-test sha=a02e5e6

@github-actions
Copy link

github-actions bot commented Dec 6, 2021

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1544132287.
Workflow: Appsmith External Integration Test Workflow.
Commit: a02e5e6.
PR: 9497.

@vibhandikyash vibhandikyash requested review from SatishGandham and removed request for vicky-primathon December 9, 2021 11:05
@@ -156,6 +156,9 @@ class DatePickerComponent extends React.Component<
<DateInput
className={this.props.isLoading ? "bp3-skeleton" : ""}
closeOnSelection={this.props.closeOnSelection}
dayPickerProps={{
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we expecting more props here, why not firstDayOfWeek instead of dayPickerProps?

Copy link
Contributor Author

@vibhandikyash vibhandikyash Dec 10, 2021

Choose a reason for hiding this comment

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

No, we are not expecting more props support right now, firstDayOfWeek is not supported directly.
As per blueprint, this is supported into dayPickerProps. @SatishGandham

SatishGandham
SatishGandham previously approved these changes Dec 14, 2021
@vibhandikyash
Copy link
Contributor Author

/ok-to-test sha=2abacb7

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1577043545.
Workflow: Appsmith External Integration Test Workflow.
Commit: 2abacb7.
PR: 9497.

@vivekverma2312
Copy link

vivekverma2312 commented Dec 14, 2021

@vibhandikyash Few observations while testing the Deploy Preview

  1. No default value for First Day Of Week property, it only populates on clicking on the calendar
  2. Changing value show the field in red colour but no error is displayed
  3. No limit is set for the property
  4. Calendar pop up UI breaks on entering the value above 6

LOOM DEMO

@vibhandikyash
Copy link
Contributor Author

/ok-to-test sha=fd3934b

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1586929442.
Workflow: Appsmith External Integration Test Workflow.
Commit: fd3934b.
PR: 9497.

@github-actions
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Dec 23, 2021
@vercel
Copy link

vercel bot commented Dec 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/get-appsmith/appsmith/HsCP2cFUQk6gARxFXgqpWarvFvLk
✅ Preview: https://appsmith-git-fix-firstdayofweek-datepicker-widget-get-appsmith.vercel.app

@techbhavin
Copy link
Contributor

/ok-to-test sha=750dfc1

@github-actions github-actions bot removed the Stale label Dec 27, 2021
@YogeshJayaseelan
Copy link
Contributor

@vibhandikyash Tested this PR and please find the status below,

Issue 1 - Fixed
Issue 2 - Fixed
Issue 3 - Fixed
Issue 4 - Fixed

New Enhancement

Issue 5 - Enhancement - Instead of values 0-6 we can pass values in String (Sunday, Monday, Tuesday, etc) which will be more helpful

@techbhavin
Copy link
Contributor

@YogeshJayaseelan
For issue 5 => For now we do not support this. we made the change of all functionality.

@somangshu plz let us know can we do this?

@somangshu
Copy link
Contributor

@techbhavin Ill agree with you, Given that this is set by the developer we can consider that they are aware of the concept, I dont see much of a value add. However, we need to clearly show this in the tooltip helper of the property to denote the index, ex 0 for sunday and so on and so forth.

Regardless of the of the critically, To implement this we could create a mapping of the index and String. (I still feel this is an overdo, even from the user point of view)

@techbhavin
Copy link
Contributor

@somangshu can we add a drop-down instead of Textbox for select First day of week ?

@somangshu
Copy link
Contributor

@techbhavin What if somebody wants to use an expression to set this dynamically. I suggest not spending much time to improve this. Rather focus on validation, helper text, test coverage for the fix.

We can have the dropdown, Given that its not going to take much time to implement, test and resolve more issues. Maybe create another enhancement for the future!
cc @YogeshJayaseelan

@techbhavin
Copy link
Contributor

/ok-to-test sha=b3cc194

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1629951129.
Workflow: Appsmith External Integration Test Workflow.
Commit: b3cc194.
PR: 9497.

@techbhavin
Copy link
Contributor

/ok-to-test sha=f847639

@techbhavin
Copy link
Contributor

/ok-to-test sha=f847639

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1632748727.
Workflow: Appsmith External Integration Test Workflow.
Commit: f847639.
PR: 9497.

@techbhavin techbhavin merged commit cfd86cf into release Dec 29, 2021
@techbhavin techbhavin deleted the fix/firstdayofweek-datepicker-widget branch December 29, 2021 05:30
leotom2000 pushed a commit that referenced this pull request Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Viewers Pod This label assigns issues to the app viewers pod Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Change first day of the week on the date-picker widget
7 participants