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

fix: page titles, routes, and sidenav consistency, add file storage logs page #4757

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sknep
Copy link
Contributor

@sknep sknep commented Mar 19, 2025

Changes proposed in this pull request:

  • Refactors sidenav and routes in order to accept multiple path patterns that end in /logs
    • Renames "Uploaded Files" to "Published Builds" in sidenav
  • Uses a FileStorageHistory hook to fill out the content for:
    • a new file storage logs UI component
  • Adds links to this logs page from the NewFileOrFolder component
  • Adds warning message (and a link to docs, TBD) about viewable logs for file actions, per Kudeha

Screenshot 2025-03-27 at 1 33 21 PM

Screenshot 2025-03-27 at 2 30 28 PM

Screenshot 2025-03-27 at 2 54 33 PM

Screenshot 2025-03-27 at 2 30 41 PM

Screenshot 2025-03-27 at 2 31 01 PM

security considerations

  • None other than what has already been noted / addressed

@cloud-gov-pages-operations
Copy link
Contributor

cloud-gov-pages-operations commented Mar 19, 2025

🤖 This is an automated code coverage report

Total coverage (lines): 33.95%
Coverage diff: 5.69% 📈

drewbo
drewbo previously requested changes Mar 25, 2025
Copy link
Contributor

@drewbo drewbo left a comment

Choose a reason for hiding this comment

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

For starters, this is definitely a huge improvement in both clarity and function. My only note is about semantics/future-proofing it a bit more.

Right now the new siteNav object is playing triple-duty: it's being used to route components, it's being used to map paths to titles, and it's being used to determine the sidebar display for a specific set of routes. I think it's probably okay to keep that all together but maybe worth renaming it something like siteRoutes if it's serving all those functions.

The use in frontend/routes.js suggests a mapping between the component name and path name but doesn't enforce it. It's worth looking into whether something like this would work to establish a single-source of truth.

SiteRoutes.map(route => (
  <Route path={route.path} element={route.Component} />
))

@sknep sknep force-pushed the feat-add-file-storage-logs-4745 branch 2 times, most recently from 5cf7858 to 1d799e1 Compare March 25, 2025 17:37
@sknep sknep force-pushed the feat-add-file-storage-logs-4745 branch 2 times, most recently from 2bf0f72 to 93d6590 Compare March 25, 2025 23:04
@sknep sknep linked an issue Mar 25, 2025 that may be closed by this pull request
5 tasks
@sknep sknep requested a review from drewbo March 25, 2025 23:08
@sknep
Copy link
Contributor Author

sknep commented Mar 25, 2025

two separate commits to make reviewing a little easier: https://github.com/cloud-gov/pages-core/pull/4757/commits

@sknep sknep requested a review from apburnes March 25, 2025 23:28
@sknep sknep dismissed drewbo’s stale review March 26, 2025 14:50

addressed suggestion and added new functionality

@sknep sknep force-pushed the feat-add-file-storage-logs-4745 branch 7 times, most recently from 5f68feb to 4235662 Compare March 27, 2025 19:27
@sknep sknep marked this pull request as ready for review March 27, 2025 19:32
@sknep
Copy link
Contributor Author

sknep commented Mar 27, 2025

if we approve and merge andrew's work on file details view first, i'll update that view to have a mini file history table to match.

@apburnes
Copy link
Contributor

@sknep let's not add additional feature work to this PR.

@sknep sknep force-pushed the feat-add-file-storage-logs-4745 branch from 4235662 to cc7aae5 Compare March 28, 2025 20:52
@sknep sknep requested a review from apburnes March 28, 2025 20:56
apburnes
apburnes previously approved these changes Mar 28, 2025
Copy link
Contributor

@apburnes apburnes left a comment

Choose a reason for hiding this comment

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

Looks good to me. 🎖️

@sknep sknep force-pushed the feat-add-file-storage-logs-4745 branch from cc7aae5 to 9f0274d Compare March 28, 2025 23:14
@sknep
Copy link
Contributor Author

sknep commented Mar 28, 2025

sorry @apburnes I forgot to change the published builds text. It's fixed now but it invalidated your approval.

however... now it looks like this :(
Screenshot 2025-03-28 at 6 15 54 PM

resizing the sidebar for this seems like overkill. I wanted to keep "Published" because it's in the path/route, but Preview Branches fits better:

Screenshot 2025-03-28 at 6 18 03 PM

And now I wanna change the icon because it really don't make sense with "preview".

Thoughts?

@sknep sknep requested a review from apburnes March 28, 2025 23:15
@apburnes
Copy link
Contributor

@sknep what icon are you thinking? Also, technically the "Published branches" is not just preview but also production and demo branches. Maybe "Site branches" could work to keep the text on one line and be more semantically accurate.

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.

Create User Actions Page for File Storage
4 participants