bitshares / bitshares-ui

Fully featured Graphical User Interface / Reference Wallet for the BitShares Blockchain
https://wallet.bitshares.org
MIT License
518 stars 570 forks source link

[2.5][twksos] Datetime picker Expiration - Calendar jumping and other behavior #2357

Open TechsUsInc opened 5 years ago

TechsUsInc commented 5 years ago

Describe the bug From the Datetime picker:

  1. The calendar jumps around randomly while scrolling through months/years. 181212-rc1_datetime_picker_calendar_1

  2. Please see #2355 #2356 #2358

To Reproduce Steps to reproduce the behavior: Note that the jumping seems to be contingent on months that have 6 weeks while most have 5 (see screenshots)

  1. Go to Exchange tab
  2. Click on the BTS tab for BitCNY:BTS pair
  3. Scroll down past the chart to buy/sell
  4. Click on default expiration of 1 year 181212rc-1_datetime_picker_1_1yr_capture
  5. Click the default timedate shown noting a calendar popup 181212rc-1_datetime_picker_1_2_capture 181212rc-1_datetime_picker_dec_capture
  6. Attempt to click or scroll quickly through the months/years noting the calendar jumps around.

Expected behavior A clear and concise description of what you expected to happen.

  1. After clicking the default expiration (1 year) the user should be able to open the calendar either way of clicking the currently shown datetime or clicking specific. The user should be able to quickly click or scroll through the months/years while the calendar remains stationary.
  2. Consider moving the word "time" to the right closer to the time.
  3. Consider adding a save (Done, or Close) button to the calendar as opposed to close on click of the selected date. Previous releases were close on click (I think). Adding a save button allows the user to modify the time if desired while the calendar is open (as opposed to closing upon clicking a date or year). 181212rc-1_datetime_picker_save_capture For illustration

Screenshots

181212rc-1_datetime_picker_april_capture 181212rc-1_datetime_picker_aug_capture 181212rc-1_datetime_picker_dec_2_capture 181212rc-1_datetime_picker_dec_capture 181212rc-1_datetime_picker_feb_capture 181212rc-1_datetime_picker_jan_capture 181212rc-1_datetime_picker_july_capture 181212rc-1_datetime_picker_june_capture 181212rc-1_datetime_picker_march_capture 181212rc-1_datetime_picker_may_capture 181212rc-1_datetime_picker_nov_capture 181212rc-1_datetime_picker_oct_capture 181212rc-1_datetime_picker_sept_capture

Desktop (please complete the following information):

Additional context I noticed while taking screenshots that if I clicked on the taskbar to open the snip tool OR anywhere else, the calendar would relocate. It prevented me from capturing the calendar shift but can be seen in the GIF capture.

twksos commented 5 years ago

request to work on this one

twksos commented 5 years ago

@startailcoon the 3 tasks in this story:

This issue is blocked for now. I'll continue when the datepicker gets merged.

startailcoon commented 5 years ago

Awaits merging of https://github.com/bitshares/react-datepicker2/pull/2

@sschiessl-bcp can you merge this?

sschiessl-bcp commented 5 years ago

Someone should have mentioned that antd comes with a datepicker.

Can we switch to that one, and check if it provides everything we need. The [1] for adjusting the old one is ontop of course.

sschiessl-bcp commented 5 years ago

Could go hand in hand with checking #2358

startailcoon commented 5 years ago

When this issue was commented on I wasn't aware we had the DateTime-picker in the style-guide. We should have indeed used that.

AntD: https://ant.design/components/date-picker/ Style-Guide: https://styleguide.bitshares.org/

@twksos care to take a look at this with the style-guide DateTime-picker instead?

We'll increase the hours to accommodate the change. Since it's a new component, I'd say we could add another 1,5 hours for this task to be coded and checked.

twksos commented 5 years ago

@startailcoon will work on replace the DateTime picker

twksos commented 5 years ago

@startailcoon I just checked the latest code. Commits in #2356 has already applied new AntD date picker and the jumping around issue has gone with the old date picker.

sschiessl-bcp commented 5 years ago

Might have been a cross-issue resolution. Please state what efforts you had until now.