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

Implement left and right arrow adjustments of timebox #1010

Closed
4 tasks
ecurrencyhodler opened this issue Nov 27, 2023 · 5 comments
Closed
4 tasks

Implement left and right arrow adjustments of timebox #1010

ecurrencyhodler opened this issue Nov 27, 2023 · 5 comments
Assignees

Comments

@ecurrencyhodler
Copy link
Contributor

ecurrencyhodler commented Nov 27, 2023

Once a date range is selected on the top right through the "last 7 days" button, the left and right arrow will help me quickly jump forward or backward in dates by using the same date range criteria.

Use moments to do pagination between dates. Functions to subtract or add from both start and end date:

  • Right arrow: moment().add(7, 'd').unix();
  • Left arrow: moment().substract7, 'd').unix();

The .unix() ending automatically converts the date into unix timestamp. This then gets sent to the backend through this call: metrics/bounty_stats

This affects not just the stats on the top of the dashboard but also the bounties displayed below. Use moments to do these manipulations.

You must also display the correct date, month, and year displayed to the right of the buttons.

Bounties V1 (5)

Acceptance Criteria

  • I've tested on Chrome
  • I've posted a video of toggling the left and right button between dates
  • I've created a component test when the left arrow backward is clicked, the start date that the moment has selected should match the text of the start date displayed to the right of the buttons.
  • I've created a component test when the left arrow backward is clicked, the end date that the moment has selected should match the text of the the end date displayed to the right of the buttons.
@Vayras
Copy link
Contributor

Vayras commented Dec 19, 2023

@ecurrencyhodler , I have Implemented this functionality with mock bounty data, during my implementation of the page , I have tested this.

@Vayras
Copy link
Contributor

Vayras commented Dec 30, 2023

@ecurrencyhodler Follow up on the this task have completed most of the work just have to fix some minor bugs, will finish this soon , a video is attached for the reference , I have also incorporated a loader for the table
https://github.com/stakwork/sphinx-tribes/assets/89837102/456d6d50-b286-4ce2-9b3b-f29a02db7a46

@ecurrencyhodler
Copy link
Contributor Author

Thanks! Looks good so far.

It looked like you had to click on the arrow for the site to update again after you selected 30 days. But that should be addressed in #1008

@Vayras
Copy link
Contributor

Vayras commented Dec 31, 2023

@ecurrencyhodler I have fixed that as well

kevkevinpal pushed a commit that referenced this issue Jan 3, 2024
…nts of timebox and date filters (#1223)

* feat(issue #1010):Implement left and right arrow adjustments of timebox

* fix(#1008):datefilters ui

* fix(#1008):prettier

* fix(#1008):updated test

* PR fix

* fix SuperAdminHeader.spec

* fix attempt statistics test

* fix attempt statistics test

* fix for test

* test fix

* test fix

* header test fix

* prettier

* header test fix

* header test fix

* test fix

* header test

* test fix

* test fix

* superadmin header test fix

* final test fix

* tested expected behaviour for stats
@ecurrencyhodler
Copy link
Contributor Author

Closed by #1223

elraphty pushed a commit that referenced this issue Jan 26, 2024
…nts of timebox and date filters (#1223)

* feat(issue #1010):Implement left and right arrow adjustments of timebox

* fix(#1008):datefilters ui

* fix(#1008):prettier

* fix(#1008):updated test

* PR fix

* fix SuperAdminHeader.spec

* fix attempt statistics test

* fix attempt statistics test

* fix for test

* test fix

* test fix

* header test fix

* prettier

* header test fix

* header test fix

* test fix

* header test

* test fix

* test fix

* superadmin header test fix

* final test fix

* tested expected behaviour for stats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants