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

Student admin management #404

Closed

Conversation

MillerSenior
Copy link
Contributor

Description of the change

Please provide a brief description of the changes included in this PR.

  • Related issues: Link to related issue(s) this PR addresses, if any (use phrases like "fixes #1234" or "closes #1234").

Screenshot(s)

If the PR includes changes to the UI, please add screenshots or a brief screengrab to demonstrate the changes.

Additional context

Please include any additional context or information that the reviewer may need to understand the PR.

@MillerSenior MillerSenior self-assigned this Oct 1, 2024
@MillerSenior MillerSenior force-pushed the student_admin_management branch from e6a6229 to 4520e21 Compare October 1, 2024 22:30
@MillerSenior
Copy link
Contributor Author

Updated student and admin management pages to accomodate figma closes #395

@MillerSenior
Copy link
Contributor Author

For some reason the trash can icon isn't displaying in the code but is in the figma on the admin page. Is this element needing a condition to render, also, the forms don't submit and I'd like to be able to add more sers to test the view further.

@jtucholski jtucholski force-pushed the student_admin_management branch from 0f99a5d to b415708 Compare October 2, 2024 14:17
Copy link
Contributor

@jtucholski jtucholski left a comment

Choose a reason for hiding this comment

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

@MillerSenior I left a few comments on both files for things that stood out to me on the initial review. That's not to say there might not be more, but before we had Carolina review it I wanted to have you look into these.

@jtucholski
Copy link
Contributor

Closes #395 once it is merged.

@jtucholski jtucholski linked an issue Oct 7, 2024 that may be closed by this pull request
Copy link
Contributor

@calisio calisio left a comment

Choose a reason for hiding this comment

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

Overall things to note:

  • This page refactor is pretty similar to the setup on ProviderPlatformManagement.tsx, so you can use that page as "code inspiration" as the code should look fairly similar.
  • I left a comment on PR HeroIcon refactor - ResourceManagement.tsx #402, but the icons need to be updated on this page too. I would consult with @corypride to see whether you will handle those updates or he will.
  • When developing, please make sure to check dark mode too! If you look at this PR now on dark mode, you can see that the colors are not changing correspondingly. This is why (as Josh mentioned before) we try to only use the colors listed on tailwind.config.js

I might have only commented on one of the two files, but all comments PROBABLY apply to both files (for example, both files should have a "solid" PlusIcon on the "Add" button, but I only left a comment on one of the files). Please modify both!

Comment on lines 189 to 202
<table className="table-2 w-full border-separate border-spacing-y-4">
<thead>
<tr className="border-gray-600">
<th className="flex">
<span>Name</span>
<tr>
<th className="px-6 pb-2 text-left text-sm font-medium text-gray-1">
Name
</th>
<th className="px-6 pb-2 text-left text-sm font-medium text-gray-1">
Username
</th>
<th className="px-6 pb-2 text-left text-sm font-medium text-gray-1">
Last Active
</th>
<th className="px-6 pb-2 text-left text-sm font-medium text-gray-1">
Actions
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you'll need to have extra classes here, they should be pre-set if you use table-2. A similar table was implemented on ProviderPlatformManagement.tsx around line 153. It should look fairly similar to that.

const updatedAt = new Date(user.updated_at);
return (
<tr
key={user.id}
className="border-gray-600"
className="bg-white shadow-sm rounded-lg"
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar thing here. You should use the class card and it should automatically apply the necessary classes for this type of card!

Copy link
Member

Choose a reason for hiding this comment

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

It also needs to maintain the type there

Comment on lines 181 to 182
<PlusIcon className="h-4 border border-white rounded-full p-1 mr-2" />{' '}
Add Student
Copy link
Contributor

@calisio calisio Oct 7, 2024

Choose a reason for hiding this comment

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

You won't need to add these classes to this icon, and rather than it being imported fromoutline, it should be imported fromsolid (the other icons on this page under "Actions" should be imported from outline, though!).

Copy link
Contributor

Choose a reason for hiding this comment

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

Totally my bad - you were right on this of it being outline!

Comment on lines 210 to 224
key={user.id}
className="border-gray-600"
className="bg-white shadow-sm"
>
<td>
{user.name_first} {user.name_last}
<td className="first:rounded-l-lg px-6 py-4">
<div className="text-sm text-gray-1">
{user.name_first}{' '}
{user.name_last}
</div>
</td>
<td className="px-6 py-4">
<div className="text-sm text-gray-1">
{user.username}
</div>
</td>
<td>{user.username}</td>
<td>
<td className="px-6 py-4">
Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure these columns align with the headers! Right now they are slightly off.
Screenshot 2024-10-07 at 10 23 51 AM

@calisio
Copy link
Contributor

calisio commented Oct 7, 2024

For some reason the trash can icon isn't displaying in the code but is in the figma on the admin page. Is this element needing a condition to render, also, the forms don't submit and I'd like to be able to add more sers to test the view further.

Also, just saw this question. Because a user should not be able to delete an admin, we have removed that icon from the page!

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.

Modify Student & Admin Management pages to fit our theme
4 participants