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

Permission groups section #406

Merged
merged 7 commits into from
Apr 23, 2020

Conversation

krzysztofwolski
Copy link
Member

@krzysztofwolski krzysztofwolski commented Feb 18, 2020

I want to merge this change because...

adds frontend for saleor/saleor#5176

To be used with API branch: feature/permission-groups

Screenshots

Screenshot-20200409005656-1144x417
Screenshot-20200409005856-1133x1276
Screenshot-20200409010845-1130x609

Pull Request Checklist

  1. All visible strings are translated with proper context.
  2. All data-formatting is locale-aware (dates, numbers, and so on).
  3. Translated strings are extracted to .pot file.
  4. Number of API calls is optimized.
  5. The changes are tested.
  6. Type definitions are up to date.
  7. Changes are mentioned in the changelog.

@krzysztofwolski krzysztofwolski marked this pull request as ready for review February 24, 2020 14:11
Copy link
Contributor

@dominik-zeglen dominik-zeglen left a comment

Choose a reason for hiding this comment

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

A few things:

  • PG section is not visible in navigator
  • These buttons are not aligned properly

Screenshot 2020-02-28 at 12 32 20

  • Bulk actions do not work
    • react throws error when checkbox is clicked
    • missing mutation
  • Table cells width should be fixed, because selecting users cause cells to expand

Screenshot 2020-02-28 at 12 46 06

Screenshot 2020-02-28 at 12 46 10

  • Selecting users should apply a proper style for the table row
  • The text should be centered and padding from both top and bottom should be increased.

Screenshot 2020-02-28 at 12 49 49

  • Since we enabled support for ?. operator, new code should not use maybe so we slowly move away from this pattern.
  • Sorting users in group details view doesn't work

@codecov
Copy link

codecov bot commented Mar 19, 2020

Codecov Report

Merging #406 into master will decrease coverage by 0.19%.
The diff coverage is 67.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #406      +/-   ##
==========================================
- Coverage   72.39%   72.19%   -0.20%     
==========================================
  Files         658      683      +25     
  Lines        7441     7705     +264     
  Branches     1227     1290      +63     
==========================================
+ Hits         5387     5563     +176     
- Misses       1819     1886      +67     
- Partials      235      256      +21     
Impacted Files Coverage Δ
src/auth/mutations.ts 100.00% <ø> (ø)
src/components/RequirePermissions.tsx 100.00% <ø> (ø)
src/config.ts 100.00% <ø> (ø)
src/configuration/index.tsx 37.50% <ø> (ø)
src/intl.ts 100.00% <ø> (ø)
src/services/fixtures.ts 100.00% <ø> (ø)
...components/StaffListPage/StaffListPage.stories.tsx 80.00% <ø> (ø)
...rybook/stories/configuration/ConfigurationPage.tsx 87.50% <ø> (ø)
src/storybook/stories/home/HomePage.tsx 76.47% <ø> (ø)
src/storybook/stories/orders/OrderCustomer.tsx 80.00% <ø> (ø)
... and 70 more

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 7878067...da1841b. Read the comment docs.

@krzysztofwolski
Copy link
Member Author

Blocked by #453

Copy link
Contributor

@dominik-zeglen dominik-zeglen left a comment

Choose a reason for hiding this comment

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

Some things are missing or should be refactored:

  • It would also be good to add warehouse list to quick search
  • Apply eslint and prettier

src/staff/views/StaffDetails.tsx Outdated Show resolved Hide resolved
@@ -20,6 +20,9 @@ const messages = defineMessages({
},
tooSimilar: {
defaultMessage: "These passwords are too similar"
},
unique: {
defaultMessage: "This needs to be unique"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this error should have generic error message 🤷‍♂️

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think it should be "Name should be unique"?

Copy link
Contributor

@dominik-zeglen dominik-zeglen Apr 22, 2020

Choose a reason for hiding this comment

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

Depends what should be unique, "name" and "slug" could have different messages. It would be nice to know what field(s) could throw this error and make proper function for each field.

Copy link
Member Author

Choose a reason for hiding this comment

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

It could be thrown only by name field so I don't think separate functions are needed. Change to 'Name needs to be unique'?

@dominik-zeglen
Copy link
Contributor

Note: something weird happened to schema, prettier maybe?

src/components/AccountPermissions/AccountPermissions.tsx Outdated Show resolved Hide resolved
src/fixtures.ts Outdated Show resolved Hide resolved
src/permissionGroups/queries.ts Outdated Show resolved Hide resolved
@krzysztofwolski krzysztofwolski requested review from dominik-zeglen and removed request for dominik-zeglen April 23, 2020 15:05
src/staff/views/StaffDetails.tsx Outdated Show resolved Hide resolved
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.

2 participants