-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
Visit the preview URL for this PR (updated for commit 2bf4512): https://mmp-site-b1c9b--pr78-feat-admin-page-tkddljmx.web.app (expires Tue, 13 Aug 2024 17:48:12 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 4eb870c89e876f1812e204af417359065d2a23b1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! I'm curious how the islands felt in practice, but it looks really clean. In terms of name, I don't mind "history", but I could also see "activity" being okay?
src/components/HistoryTable.tsx
Outdated
<th>Name</th> | ||
<th>Institution</th> | ||
<th>Email</th> | ||
<th>Description</th> | ||
<th>Download Date</th> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there might be a way to remove this... I don't like tables as UI elements, so feel free to ignore this, but I wonder if you could write each row as a list item formatted something like this?
- Heather Yu (Brown) -- 03/26/2024
This doesn't include the description, but I'm not certain what you were envisioning there. Just some food for thought! Feel free to ignore this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anna-murphy can you expand on this? I'm pretty sure tables are best practice for accessibility when you have multi-dimensional data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm wondering if the data is really multi-dimensional. If that's not a useful suggestion I can rescind it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about this quite a bit -- the most important feature for David (I think) is for him to be able to get all the emails of the users who have downloaded the data. My thought is to just ask David, but he has indicated a preference for mirroring UI of the old site, which is why leaving it as a table may be preferred.
I fully agree with the non-table preference, but this table will likely be 1-5 rows total.
src/firebase-config.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how Astro handles this, but can these be moved to secrets somewhere? I feel like we don't want to keep this info so visible if we can avoid it, you know? But maybe Astro obfuscates that enough.
src/firebase.js
Outdated
const db = getFirestore(app) | ||
export const auth = getAuth(app) | ||
|
||
export const addHistoryData = async (inputs) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this called? I don't see it in the changelog at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is meant to be added AFTER #77 , where this is introduced.
Things:
|
Co-authored-by: Anna Murphy <[email protected]>
…to feat-admin-page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One final thing: can you align text in the table to the top of the row in each cell?
Goal: Adds a page for any administrators to view WHO has downloaded the data
login is limited by users who are explicitly in the admin firestore collection:
https://console.firebase.google.com/project/mmp-site-b1c9b/firestore/databases/-default-/data/~2Fadmin~2FQiYKGn6GU071d6MuDYBH
Questions for Reviewers
/admin is taken by staticCMS, so I am proposing /history (although I am not in love with it. any ideas?)
We could take advantage of astro's islands feature here by using atoms: https://docs.astro.build/en/recipes/sharing-state-islands/ not sure if performance would be a concern here?
We need to ask David how far back he wants the data. We can ask @anna-murphy for help here if we need firestore filtering.