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

[PUI] User settings panel updates #7944

Merged
merged 32 commits into from
Sep 14, 2024

Conversation

SchrodingersGat
Copy link
Member

@SchrodingersGat SchrodingersGat commented Aug 21, 2024

  • Updates user theme settings / display settings
  • Fixes some bugs / issues on the way
  • General refactoring

TODO

  • Implement "reset to default" functionality
  • Add new user (without any permissions) for testing -Add a new user / group demo-dataset#78
  • Fix /api/user/me/API endpoint (permissions)
  • Prevent user from changing their own "superuser" / "staff" / "active" attributes

Future Work

  • Add ability to change own password from PUI
  • Use the selected "loader" style throughout the interface

@SchrodingersGat SchrodingersGat added old user interface Issues with Old User interface refactor Platform UI Related to the React based User Interface labels Aug 21, 2024
@SchrodingersGat SchrodingersGat added this to the 0.17.0 milestone Aug 21, 2024
Copy link

netlify bot commented Aug 21, 2024

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit bbcd6b4
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/66e4ea92d21c94000805e335
😎 Deploy Preview https://deploy-preview-7944--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 1 from production)
Accessibility: 86 (no change from production)
Best Practices: 92 (no change from production)
SEO: 70 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@matmair
Copy link
Member

matmair commented Aug 21, 2024

But why?

return 50;
}
const [radius, setRadius] = useState(getDefaultRadius());
function changeRadius(value: number) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do I get this right, that this removes the ability to use a "rounder" radius than by default? I really liked to set it to a rounder radius than default, so this was really helpful. I once thought about defining default options on the via the config/env for these values here, because I always have to change this on a new client, and I know that pushing a rounder radius to core is not well liked by others.

@SchrodingersGat SchrodingersGat marked this pull request as draft August 21, 2024 06:54
@SchrodingersGat
Copy link
Member Author

@matmair @wolflu05 sorry I should have marked this as draft. Most of this will get added back in, I'll ping you when I'm ready for a review of it

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 87.93103% with 7 lines in your changes missing coverage. Please review.

Project coverage is 84.45%. Comparing base (a5ab4a3) to head (bbcd6b4).
Report is 296 commits behind head on master.

Files with missing lines Patch % Lines
.../Index/Settings/AccountSettings/UserThemePanel.tsx 42.85% 4 Missing ⚠️
src/backend/InvenTree/InvenTree/permissions.py 80.00% 1 Missing ⚠️
src/backend/InvenTree/users/api.py 87.50% 1 Missing ⚠️
...rc/frontend/src/components/buttons/YesNoButton.tsx 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7944      +/-   ##
==========================================
- Coverage   84.48%   84.45%   -0.04%     
==========================================
  Files        1144     1143       -1     
  Lines       51190    51218      +28     
  Branches     1792     1791       -1     
==========================================
+ Hits        43247    43255       +8     
- Misses       7732     7752      +20     
  Partials      211      211              
Flag Coverage Δ
backend 85.77% <95.23%> (+<0.01%) ⬆️
pui 68.71% <68.75%> (-0.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SchrodingersGat SchrodingersGat changed the title [PUI] Theme simplification [PUI] User settings panel updates Aug 21, 2024
@SchrodingersGat
Copy link
Member Author

Current state:

image

- Override the 'get_permission_model' attribute with None
- Required for extracting field information even if we only have 'read' permissions
- e.g. getting table columns for users without write perms
- use 'GET' action when reading table cols
@SchrodingersGat SchrodingersGat marked this pull request as ready for review September 6, 2024 01:04
@SchrodingersGat SchrodingersGat merged commit 7fbc1fb into inventree:master Sep 14, 2024
26 checks passed
@SchrodingersGat SchrodingersGat deleted the theme-simplificatio branch September 14, 2024 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
old user interface Issues with Old User interface Platform UI Related to the React based User Interface refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants