Skip to content

fix: added support for timePrecision#9423

Merged
techbhavin merged 14 commits intoreleasefrom
feature/improved-datetimepicker
Dec 23, 2021
Merged

fix: added support for timePrecision#9423
techbhavin merged 14 commits intoreleasefrom
feature/improved-datetimepicker

Conversation

@techbhavin
Copy link
Contributor

@techbhavin techbhavin commented Nov 29, 2021

Description

Allow users to insert hour:time: seconds in date-time-picker widget

Fixes #9100

Type of change

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

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented on 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 increased
// Code coverage diff between base branch:release and head branch: feature/improved-datetimepicker 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 55.23 (0.01) 37.02 (0.01) 34.08 (0.01) 55.75 (0.02)
🟢 app/client/src/selectors/commentsSelectors.ts 85.25 (1.64) 64.71 (2.95) 73.33 (0) 90.59 (2.35)
✨ 🆕 app/client/src/widgets/DatePickerWidget2/constants.ts 100 100 100 100
🔴 app/client/src/widgets/DatePickerWidget2/component/index.tsx 27.78 (0) 3.08 (-0.09) 6.25 (0) 27.14 (0)
🟢 app/client/src/widgets/DatePickerWidget2/widget/index.tsx 84.62 (0.62) 0 (0) 75 (0) 87.5 (0.54)
🟢 app/client/src/widgets/TableWidget/component/CascadeFields.tsx 28.68 (0.55) 24.66 (0) 3.13 (0) 30.33 (0.58)

@techbhavin techbhavin added Widgets Product This label groups issues related to widgets UI Building Pod labels Nov 29, 2021
@techbhavin techbhavin requested a review from jsartisan November 29, 2021 06:41
@github-actions github-actions bot added the Bug Something isn't working label Nov 29, 2021
@techbhavin techbhavin changed the title fix:added support for timePrecision fix: added support for timePrecision Nov 30, 2021
@techbhavin
Copy link
Contributor Author

/ok-to-test sha=c781f1f

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1519427752.
Workflow: Appsmith External Integration Test Workflow.
Commit: c781f1f.
PR: 9423.

jsartisan
jsartisan previously approved these changes Nov 30, 2021
@shwetha-ramesh
Copy link

@techbhavin tested this PR

  1. the time slot input box appears only when the input is dropped on the canvas. When the user changes from the default format to any other format and moved back to the default format the time slot input disappears. (refer video)
  2. Time slot input not available for any of the format that.

https://loom.com/share/406044fb99a4403489afcc487dd83ed2

@techbhavin
Copy link
Contributor Author

/ok-to-test sha=8fbf0d4

@github-actions
Copy link

github-actions bot commented Dec 2, 2021

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1530702978.
Workflow: Appsmith External Integration Test Workflow.
Commit: 8fbf0d4.
PR: 9423.

jsartisan
jsartisan previously approved these changes Dec 6, 2021
@techbhavin
Copy link
Contributor Author

/ok-to-test sha=e9bc116

@github-actions
Copy link

github-actions bot commented Dec 7, 2021

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1547780745.
Workflow: Appsmith External Integration Test Workflow.
Commit: e9bc116.
PR: 9423.

@shwetha-ramesh
Copy link

@techbhavin tested this PR. Below are the points.

  1. The seconds field must not be shown for YYYY-MM-DD HH:mm format or any format that does not have ss mentioned, irrespective of what 'time precision' is set
    https://loom.com/share/0f9adc6e148d42fda0c96a5a7842c068

  2. Clear must clear the timeslot values also.
    image

https://loom.com/share/b10f5565f2b74c7ea760de1d7db4c492

  1. Since the Time precision field is placed at the end of General settings, the user might not know a field as such exists and when changes the format which has hh:mm:ss and not be able to change the seconds field.

@techbhavin
Copy link
Contributor Author

techbhavin commented Dec 7, 2021

The seconds field must not be shown for YYYY-MM-DD HH:mm format or any format that does not have ss mentioned, irrespective of what 'time precision' is set

In a current implementation, we show hh:mm in every format. did we want to do as per @shwetha-ramesh mention?

ALSO NEED FEEDBACK about point 2 , 3

@somangshu @sbalaji1192 @riodeuno @Tooluloope

@sbalaji1192
Copy link
Contributor

sbalaji1192 commented Dec 9, 2021

@techbhavin @shwetha-ramesh @Tooluloope
WRT,

  1. Current implementation seems good as it's not leading to any bug. Having two configs controlling the same field is bit much to maintain.
  2. Agreed on the callout. we need to clear the time as well. since closing and opening the popup resets the time.
  3. Let's move the time precision right below to the time format.

@techbhavin
Copy link
Contributor Author

/ok-to-test sha=e0c5d8a

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1562431314.
Workflow: Appsmith External Integration Test Workflow.
Commit: e0c5d8a.
PR: 9423.

@techbhavin
Copy link
Contributor Author

@sbalaji1192 @shwetha-ramesh @Tooluloope

point 3: updated
point 2: here we have a limitation in the library we can’t reset the time picker value.

image

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1592014924.
Workflow: Appsmith External Integration Test Workflow.
Commit: db2e9ec.
PR: 9423.

@shwetha-ramesh
Copy link

As agreed upon with above comments. Moving to DONE.

@vercel
Copy link

vercel bot commented Dec 21, 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/7oTMNYZZ6q4UfusTTxw8iXiK5KDk
✅ Preview: https://appsmith-git-feature-improved-datetimepicker-get-appsmith.vercel.app

@techbhavin
Copy link
Contributor Author

/ok-to-test sha=705c400

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1606057955.
Workflow: Appsmith External Integration Test Workflow.
Commit: 705c400.
PR: 9423.

1 similar comment
@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1606057955.
Workflow: Appsmith External Integration Test Workflow.
Commit: 705c400.
PR: 9423.

@techbhavin
Copy link
Contributor Author

/ok-to-test sha=1fa162c

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1606898439.
Workflow: Appsmith External Integration Test Workflow.
Commit: 1fa162c.
PR: 9423.

@techbhavin
Copy link
Contributor Author

/ok-to-test sha=1fa162c

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1610141047.
Workflow: Appsmith External Integration Test Workflow.
Commit: 1fa162c.
PR: 9423.

1 similar comment
@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1610141047.
Workflow: Appsmith External Integration Test Workflow.
Commit: 1fa162c.
PR: 9423.

import IconSVG from "./icon.svg";
import moment from "moment";
import { GRID_DENSITY_MIGRATION_V1 } from "widgets/constants";
import { TimePrecision } from "@blueprintjs/datetime";
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets use our TimePrecision

@techbhavin
Copy link
Contributor Author

/ok-to-test sha=bd8d93a

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1614512734.
Workflow: Appsmith External Integration Test Workflow.
Commit: bd8d93a.
PR: 9423.

@techbhavin techbhavin enabled auto-merge (squash) December 23, 2021 10:00
@sbalaji1192 sbalaji1192 disabled auto-merge December 23, 2021 11:44
@techbhavin techbhavin enabled auto-merge (squash) December 23, 2021 12:07
@techbhavin techbhavin merged commit 244b089 into release Dec 23, 2021
@techbhavin techbhavin deleted the feature/improved-datetimepicker branch December 23, 2021 14:17
@dilippitchika dilippitchika added the Documentation Improvements or additions to documentation label Jan 5, 2022
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

Bug Something isn't working Documentation Improvements or additions to documentation Widgets Product This label groups issues related to widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Allow users to insert hour:time:seconds - improved datetimepicker

8 participants