Skip to content

Conversation

@jayoshih
Copy link
Contributor

@jayoshih jayoshih commented Jun 30, 2020

Description

Admin channel page:

  • Freeze first column and row so you can still access the scrollbars
  • Updated the way filtering is handled (more generalizable mixin generator)
  • Hooked up channel details/sharing modal options
  • Added channel size query
  • Updated to use new viewset backend
  • Added demo and source url fields

Admin user page:

  • Freeze first column and row so you can still access the scrollbars
  • Updated the way filtering is handled (used shared mixin)
  • Added user details modal
  • Added storage logic
  • Updated to use new viewset backend
  • Hooked up action logic
  • Added policies table
  • Added email workflow

Issues fixed

Implementation Notes (optional)

Includes changes from #1962 to avoid merge conflicts if possible

Does this introduce any tech-debt items?

Things to fix in channel CRUD follow up:

  • Fix syncing to fire reliably (doesn't seem to fire consistently)
  • Allow public/private switching (want to make this only available for admin users)
  • Restore (need to allow syncing on deleted channels)
  • Delete permanently (need to delete from database)
  • Channel sorting (ascending/descending)
  • Sort by filter
  • In general, make sure all the filters are working

Things to fix in user CRUD follow up:

  • Fix syncing to fire reliably (doesn't seem to fire consistently)
  • Fix activation/deactivation (admins only)
  • Set storage (admins only)
  • Revoke admin access (admins only)
  • Delete permanently (need to delete from database)
  • User sorting (ascending/descending)
  • Sort by filter
  • In general, make sure all the filters are working

Checklist

  • Is the code clean and well-commented?
  • Has the docs label been added if this introduces a change that needs to be updated in the user docs?
  • Has the CHANGELOG label been added to this pull request? Items with this label will be added to the CHANGELOG at a later time
  • Are there tests for this change?
  • Are all UI components LTR and RTL compliant (if applicable)?
  • Are views organized into pages, components, and layouts directories as described in the docs?
  • Are there any new ways this uses user data that needs to be factored into our Privacy Policy?
  • Are there any new interactions that need to be added to the QA Sheet?

@jayoshih
Copy link
Contributor Author

Going to work on adding frontend tests soon

@jayoshih jayoshih added the WIP label Jun 30, 2020
@jayoshih jayoshih changed the title Channel admin page updates Admin page updates Jul 2, 2020
@jayoshih jayoshih removed the WIP label Jul 2, 2020
@jayoshih
Copy link
Contributor Author

jayoshih commented Jul 2, 2020

Will open followup PR with tests

@codecov
Copy link

codecov bot commented Jul 2, 2020

Codecov Report

Merging #1977 into develop will increase coverage by 0.26%.
The diff coverage is 71.28%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1977      +/-   ##
===========================================
+ Coverage    79.11%   79.38%   +0.26%     
===========================================
  Files          277      274       -3     
  Lines        13539    13134     -405     
===========================================
- Hits         10712    10427     -285     
+ Misses        2827     2707     -120     
Impacted Files Coverage Δ
contentcuration/contentcuration/tasks.py 72.64% <ø> (+0.87%) ⬆️
contentcuration/contentcuration/views/admin.py 69.38% <42.85%> (+1.75%) ⬆️
...ontentcuration/contentcuration/viewsets/channel.py 79.06% <67.56%> (-2.40%) ⬇️
contentcuration/contentcuration/viewsets/user.py 60.12% <74.00%> (+6.14%) ⬆️
contentcuration/contentcuration/urls.py 92.02% <100.00%> (+0.23%) ⬆️
contentcuration/contentcuration/viewsets/common.py 93.93% <100.00%> (+0.28%) ⬆️
contentcuration/contentcuration/utils/format.py 57.89% <0.00%> (-15.79%) ⬇️
contentcuration/contentcuration/statistics.py 31.45% <0.00%> (-5.65%) ⬇️
contentcuration/contentcuration/serializers.py 67.05% <0.00%> (-2.00%) ⬇️
...ation/contentcuration/management/commands/setup.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b8b14f...ed63dab. Read the comment docs.

Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Nothing blocking here!

fileSizeInTerabytes: '{n, number, integer} TB',
});

const ONE_B = 1;
Copy link
Member

Choose a reason for hiding this comment

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

Was about to comment on the constants.js above:

Maybe we should import these constants into mixins.js?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! I moved it to constants so that I can use it under other components (in this case UserStorage)

PRIVACY: 'privacy_policy',
};
export const policyDates = {
[policies.PRIVACY]: new Date(2018, 4, 25),
Copy link
Member

Choose a reason for hiding this comment

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

Do we have this date stored anywhere else? Is this just based on a git commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We've mostly been hardcoding it in to keep track of the dates each new version was published

<template #header>
<span class="notranslate">{{ channel.name }}</span>
</template>
<template v-if="adminMode" #tabs>
Copy link
Member

Choose a reason for hiding this comment

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

I think eventually it might make sense to break out the 'info' tab into a component and just have an admin specific modal that uses the info component and the sharing component - just the 'adminMode' gave me a lilttle pause, as adding additional mode props to components is often a sign we are trying to make one component do too much work!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that you mention it, I might be able to just use the Details component for its own modal

@rtibbles rtibbles merged commit c76fc84 into learningequality:develop Jul 2, 2020
@jayoshih jayoshih mentioned this pull request Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants