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

Enable pagination for all organizations #13824

Merged
merged 10 commits into from
Apr 1, 2020
Merged

Conversation

hschallhorn
Copy link
Contributor

@hschallhorn hschallhorn commented Mar 30, 2020

Resolves #13714

Description

Enables pagination for every organization and removes unused code

UI Changes

This only applies to organizations that did not have pagination.

Queue tabs

Tab Name Description Before After Change
Unassigned Tasks that have not been assigned to a member of the organization Screen Shot 2020-03-30 at 12 41 11 PM Screen Shot 2020-03-30 at 12 40 03 PM NONE
Assigned Tasks that have been assigned to a member of the organization Screen Shot 2020-03-30 at 12 41 19 PM Screen Shot 2020-03-30 at 12 40 11 PM Tasks that have been assigned and are now on hold are moved to the on hold tab
On hold Tasks that have been assigned to a member of the organization and are now on hold NONE Screen Shot 2020-03-30 at 12 40 18 PM New tab!
Completed Tasks that have been completed in the last 2 weeks Screen Shot 2020-03-30 at 12 46 53 PM Screen Shot 2020-03-30 at 12 47 15 PM NONE

Assigned tasks

Tasks in the assigned tab will now show how long the task has been waiting at the assigned user. Example below of a task that was created for the translation team 29 days ago and assigned to a team member today.

Before
Screen Shot 2020-03-30 at 12 41 19 PM
After
Screen Shot 2020-03-30 at 12 40 11 PM

Deep links

The URL will update as the user selects a new tab, sort column, sort order, or filters. This link can be bookmarked or saved to return to that same sorted and filtered set of tasks.

ezgif-3-517b4efbb032

@hschallhorn hschallhorn self-assigned this Mar 30, 2020
@@ -61,7 +61,7 @@ def show_reader_link_column?
end

def use_task_pages_api?
false
true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Heart of the change. The rest is just removing unused code and fixing tests

def tabs
queue_tabs = assignee.queue_tabs

return queue_tabs unless !assignee.use_task_pages_api? && assignee_is_org?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was used to handle any orgs that did not use pagination. None of those exist anymore.

@codeclimate
Copy link

codeclimate bot commented Mar 30, 2020

Code Climate has analyzed commit b394a33 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Performance 1

View more on Code Climate.

@va-bot
Copy link
Collaborator

va-bot commented Mar 30, 2020

1 Warning
⚠️ This is a Big PR. Try to break this down if possible. Stacked pull requests encourage more detailed and thorough code reviews

Generated by 🚫 Danger

@@ -59,19 +59,18 @@ class OrganizationQueue extends React.PureComponent {
return config;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All changes in OrganizationQueue.jsx are due to config.use_task_pages_api returning true for all orgs

@@ -445,341 +447,230 @@ def validate_pulac_cerullo_tasks_created(task_class, label)
before do
organization.add_user(organization_user)
User.authenticate!(user: organization_user)
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

View without whitespace changes if need be. Removed "when not using pagination" as pagination should always be enabled

@@ -222,34 +222,6 @@
end
end

describe ".use_task_pages_api?" do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Always returns true

@@ -88,7 +88,7 @@

context "with a non-VSO organization assignee" do
it "does not include a tab for tracking tasks" do
expect(subject.length).to eq(3)
expect(subject.length).to eq(4)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@ajspotts ajspotts left a comment

Choose a reason for hiding this comment

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

Lgtm!

@hschallhorn hschallhorn added the Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master label Apr 1, 2020
@va-bot va-bot merged commit 4a1fd3c into master Apr 1, 2020
@va-bot va-bot deleted the hschallhorn/pagination-all branch April 1, 2020 14:15
@hschallhorn hschallhorn mentioned this pull request Apr 6, 2020
1 task
va-bot pushed a commit that referenced this pull request Apr 7, 2020
### Description
Removes selectors that are unused as of #13824.

### Acceptance Criteria
- [ ] No unused selectors in the code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve load times for organizations/privacy/tasks
3 participants