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

Admin settings dashboard and modal addition for user components #1310

Conversation

hazeltonbw
Copy link
Contributor

@hazeltonbw hazeltonbw commented Jul 17, 2024

Description

In this PR the main focus was to streamline the admin panel to make it more user friendly and future proof for additional features.
There were also changes to the components that allow admins to manage users. These changes were made to stay consistent with the design choices from other pages which utilizes modals to create, edit, and delete users.

Fixes: #890

Type of change

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

Thanks to @hazeltonbw for doing this work.

I have done a high level review of this PR. Given my comments I want to see how they are resolved before doing a complete review as it may lead to nontrivial change. I'm happy to discuss any comments and hear your thoughts.

Here are a couple of high level comments that did not fit anywhere or I could not put in comments in the file:

  1. The test build on GitHub is failing because the new translation files do no conform to what OED needs. I suspect they may go away but if not then this must be addressed.
  2. I'm unclear on the new en.ts, fr.ts and es.ts translation files. They overlap the data.ts ones. I recall a team meeting where they were discussed and I thought we resolved not to separate out the translations (at least not now). Could you help me understand and let me know if my recollection is off?

@@ -0,0 +1,54 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
Copy link
Member

Choose a reason for hiding this comment

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

While I think this change to a sidebar is interesting, I have a couple of thoughts:

  1. This is only done on this one page and I wonder if OED is going to do this should it be part of all the pages that are appropriate such as meters. However, on meters it is a modal so formatting and layout would need to be considered. Given this, I think the project should discuss whether or not to do this.
  2. If OED is going to do this generally then we should consider how. For example, react-pro-sidebar is a very fancy one (maybe too much) but packages should be analyzed before we do this via our own styling.

I'm open to ideas but right now I'm inclined to remove this and create something new that addresses this one idea.

Just a few overview comments for the record:

  • The items are not alphabetical as are menus in OED.
  • Users are being removed from this page.
  • Might be nice to have an all option to see everything.

* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import * as React from 'react';
Copy link
Member

Choose a reason for hiding this comment

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

I want to understand how this relates to PR #1306 that created cards/modal for users. First, if it is the same basic work then this PR must be held until that work is review/approved in the separate PR. Second, the plan was to remove user from the admin panel (now site settings) so not sure if/where this belongs.


interface PreferencesProps {
selectedPreference: string;
}

// TODO: Add warning for invalid data
Copy link
Member

Choose a reason for hiding this comment

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

Status of TODO?


interface PreferencesProps {
selectedPreference: string;
}

// TODO: Add warning for invalid data
/**
Copy link
Member

Choose a reason for hiding this comment

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

ESLint warning on missing param in JSDoc.

@@ -0,0 +1,76 @@
/* eslint-disable no-mixed-spaces-and-tabs */
Copy link
Member

Choose a reason for hiding this comment

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

Same question from other file on how relates to other PR. Also applies to UsersDetailsComponent.

@@ -503,34 +504,34 @@ const LocaleTranslationData = {
},
"fr": {
"3D": "3D",
"400": "400 Bad Request\u{26A1}",
"400": "400 Bad Request",
Copy link
Member

Choose a reason for hiding this comment

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

I am unclear on why you removed the special symbol at the end of untranslated strings and seem not to have done for all. Please see the PR that created them and then let me know if you think they should still be removed.

"return.dashboard": "Return To Dashboard",
"role": "Rôle",
"save.all": "Sauver tous",
"save.map.edits": "Enregistrer les modifications de la carte",
Copy link
Member

Choose a reason for hiding this comment

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

You seem to have translated strings that are not directly involved in this PR. Is that correct or am I missing something? If so then: First, should this be a separate PR? Second, since you only did a few, is this a language you are very good at so the translations will be of high quality?

@hazeltonbw
Copy link
Contributor Author

This PR has been superseded by PR #1316 and will now be closed.

@hazeltonbw hazeltonbw closed this Jul 23, 2024
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.

modal for admin user pages
4 participants