-
Notifications
You must be signed in to change notification settings - Fork 57
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
[ENG-6116] Sort User Columns for Institutional Dashboard User table #2300
[ENG-6116] Sort User Columns for Institutional Dashboard User table #2300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my biggest question is if we want to change the sort-button
component for this project, as it is used pretty widely in our codebase. My personal preference is use the sort-button
component as it was and have it show two arrows, as I feel that is more informative/less confusing, but I would ask Product team folks
app/institutions/dashboard/-components/institutional-users-list/template.hbs
Outdated
Show resolved
Hide resolved
app/institutions/dashboard/-components/institutional-users-list/template.hbs
Outdated
Show resolved
Hide resolved
app/institutions/dashboard/-components/institutional-users-list/template.hbs
Outdated
Show resolved
Hide resolved
app/institutions/dashboard/-components/institutional-users-list/template.hbs
Outdated
Show resolved
Hide resolved
app/institutions/dashboard/-components/institutional-users-list/template.hbs
Outdated
Show resolved
Hide resolved
app/institutions/dashboard/-components/institutional-users-list/template.hbs
Outdated
Show resolved
Hide resolved
app/institutions/dashboard/-components/institutional-users-list/template.hbs
Outdated
Show resolved
Hide resolved
…ForOpenScience/ember-osf-web into sort-users-for-inst-dashboard * 'feature/insti-dash-improv' of https://github.com/CenterForOpenScience/ember-osf-web: [ENG-6078][ENG-6080] Link to past reports (CenterForOpenScience#2296) # Conflicts: # app/institutions/dashboard/-components/institutional-users-list/component.ts
e11f7f9
to
1d64e48
Compare
7e3dac8
to
2619eff
Compare
2619eff
to
7911d2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work so far! Just a few minor things I see, but I think we are quite close!
@@ -12,7 +12,7 @@ | |||
> | |||
{{department}} | |||
</PowerSelect> | |||
<ContentPlaceholders as |placeholder|> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this <ContentPlaceholders>
is not being used for anymore, so I think we're good to remove this
</th> | ||
<th local-class='nested-header text-center' colspan='2' width='128'> | ||
{{t 'institutions.dashboard.users_list.projects'}} | ||
<th> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add a data-test-header-osf-link
or something like that here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not? :) 👍
<th> | ||
<span>{{t 'institutions.dashboard.users_list.private_projects'}}</span> | ||
<SortArrow @sortBy='private_projects' /> | ||
</th> | ||
<th data-test-header-private-projects> | ||
{{t 'institutions.dashboard.users_list.public_registration_count'}} | ||
<SortArrow @sortBy='public_registration_count' /> | ||
</th> | ||
<th> | ||
{{t 'institutions.dashboard.users_list.private_registration_count'}} | ||
<SortArrow @sortBy='embargoed_registration_count' /> | ||
</th> | ||
<th> | ||
{{t 'institutions.dashboard.users_list.published_preprint_count'}} | ||
<SortArrow @sortBy='published_preprint_count' /> | ||
</th> | ||
<th> | ||
{{t 'institutions.dashboard.users_list.public_file_count'}} | ||
<SortArrow @sortBy='public_file_count' /> | ||
</th> | ||
<th local-class='nested-header text-center' data-test-header-private-projects> | ||
<img src='/assets/images/global/closed-lock.svg' | ||
alt={{t 'institutions.dashboard.users_list.private_projects'}} | ||
> | ||
<th> | ||
{{t 'institutions.dashboard.users_list.storage_byte_count'}} | ||
<SortArrow @sortBy='storage_byte_count' /> | ||
</th> | ||
<th> | ||
{{t 'institutions.dashboard.users_list.account_created'}} | ||
<SortArrow @sortBy='account_created' /> | ||
</th> | ||
<th> | ||
{{t 'institutions.dashboard.users_list.month_last_login'}} | ||
<SortArrow @sortBy='month_last_login' /> | ||
</th> | ||
<th> | ||
{{t 'institutions.dashboard.users_list.month_last_active'}} | ||
<SortArrow @sortBy='month_last_active' /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of these <th>
's don't have any data-test
attributes. Could you please add these in for tests later?
app/institutions/dashboard/-components/institutional-users-list/template.hbs
Outdated
Show resolved
Hide resolved
<td data-test-item-account-created>{{moment-format institutionalUser.accountCreationDate 'MM/DD/YYYY HH:mm:SS'}}</td> | ||
<td data-test-item-last-login>{{moment-format institutionalUser.monthLastLogin 'MM/DD/YYYY HH:mm:SS'}}</td> | ||
<td data-test-item-last-active>{{moment-format institutionalUser.monthLastActive 'MM/DD/YYYY HH:mm:SS'}}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would ask for Product team for a bit a clarification, but I think for account creation date, we could just do day-level specificity, and for last-login and last-active, we will only show the month level of specificity
<td data-test-item-account-created>{{moment-format institutionalUser.accountCreationDate 'MM/DD/YYYY HH:mm:SS'}}</td> | |
<td data-test-item-last-login>{{moment-format institutionalUser.monthLastLogin 'MM/DD/YYYY HH:mm:SS'}}</td> | |
<td data-test-item-last-active>{{moment-format institutionalUser.monthLastActive 'MM/DD/YYYY HH:mm:SS'}}</td> | |
<td data-test-item-account-created>{{moment-format institutionalUser.accountCreationDate 'MM/DD/YYYY'}}</td> | |
<td data-test-item-last-login>{{moment-format institutionalUser.monthLastLogin 'MM/YYYY'}}</td> | |
<td data-test-item-last-active>{{moment-format institutionalUser.monthLastActive 'MM/YYYY'}}</td> |
@@ -0,0 +1,25 @@ | |||
import { tagName } from '@ember-decorators/component'; | |||
import Component from '@ember/component'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we change this to a glimmer component? This is a "Ember Classic" Component, and we are trying to move away from these, so for new components I'd like to see us using glimmer components. We can pair on this as there are a number of small changes that are a bit cumbersome to go through in PR comments
There's a quick cheatsheet here with some differences between ember classic and glimmer components that I find myself referring to regularly https://ember-learn.github.io/ember-octane-vs-classic-cheat-sheet/
…ForOpenScience/ember-osf-web into sort-users-for-inst-dashboard * 'feature/insti-dash-improv' of https://github.com/CenterForOpenScience/ember-osf-web: Link to reports updates (CenterForOpenScience#2302)
c6227d2
to
d1b9353
Compare
831baf0
to
d38d7de
Compare
d38d7de
to
ca31526
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one issue I'd like to see fixed, but that can happen in a later ticket for CSS
ecf2df2
to
352a71d
Compare
5cc1654
into
CenterForOpenScience:feature/insti-dash-improv
Purpose
This updates the old flaky institutional dashboard table with a new one that
Summary of Changes
Screenshot(s)
Side Effects
QA Notes