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

Add link copy and increase click count limit for UserTable #177

Merged
merged 16 commits into from
Jun 12, 2020
Merged

Conversation

kylerwsm
Copy link
Contributor

@kylerwsm kylerwsm commented Jun 10, 2020

Problem

This PR brings the copy link button to the user table, and shows users the exact number of clicks, with comma separation applied, up to 9,999,999. After which, compact notations will be used.

Closes #157.

Solution

  • Extract and generalise the existing copy link button from the drawer, to accommodate an additional use case in the url table.
  • I have modified our number formatter, to only apply compact notations when the number is 10,000,000 and above. The relevant unit tests are updated to make sure the formatter works as intended.
  • Test on IE11.

Improvements:

  • We do not need types in production. I have shifted all types to development dependencies.
  • Migrated some files to TypeScript. Noticeably, there were some invalid syntax in our theme file, which I have then corrected.
  • Renamed the client side type files to be more representative of the types they hold.
  • The threshold value before click count is applied is extracted out into an exported module.

Before & After Screenshots

AFTER:
Desktop, Mobile, IE11.

@kylerwsm kylerwsm requested a review from JasonChong96 June 11, 2020 09:38
@kylerwsm kylerwsm requested a review from yong-jie June 11, 2020 11:19
Copy link
Member

@yong-jie yong-jie left a comment

Choose a reason for hiding this comment

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

lgtm

@kylerwsm kylerwsm merged commit e2bda20 into develop Jun 12, 2020
@kylerwsm kylerwsm deleted the table branch June 12, 2020 05:27
LoneRifle pushed a commit that referenced this pull request Jun 17, 2020
* Refactor and added copy button to table

* Migrate to typescript

* Shift types to dev deps

* Improved naming of image type file

* Added type file for fonts

* Migrate theme file to typescript

* Update entry file file format

* Number compact notations to apply only to millions

* Increase width of click cell to accomodate mils

* Tweak ui to accomodate larger click count

* Undo redundant change

* Adds tsdoc to removeHttpsProtocol

* Convert max count before compacting to 9,999,999

* Formatting changes

* Corrected tests for number formatting

* Use mui variant type
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.

Show link clicks up to 9,999,999, on UserPage
3 participants