-
Notifications
You must be signed in to change notification settings - Fork 5.7k
feat: make website table rows clickable #3670
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
base: master
Are you sure you want to change the base?
feat: make website table rows clickable #3670
Conversation
|
@marvinoffers is attempting to deploy a commit to the umami-software Team on Vercel. A member of the Team first needs to authorize it. |
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.
Greptile Overview
Greptile Summary
Made website table name and domain cells clickable by wrapping them in Next.js Link components, improving navigation UX.
- Wrapped name and domain text in
Linkcomponents whenallowViewis enabled - Added CSS module for link styling with
color: inheritand flexbox layout - Links navigate to
/websites/{id}using the existingrenderTeamUrlhelper - Maintains backward compatibility by only showing links when
allowViewprop is true
Confidence Score: 4/5
- This PR is safe to merge with minimal risk - straightforward UX improvement
- Simple, focused change that adds clickable links to table cells. Logic is straightforward and respects existing
allowViewpermission flag. Minor style improvement suggested for better user feedback. - The CSS file could benefit from hover states for better visual feedback
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| src/app/(main)/settings/websites/WebsitesTable.tsx | 4/5 | Added clickable links to name and domain cells when allowView is enabled, improving UX by making table rows navigable |
| src/app/(main)/settings/websites/WebsitesTable.module.css | 3/5 | Added link styling but missing hover states for visual feedback |
Sequence Diagram
sequenceDiagram
participant User
participant WebsitesTable
participant LinkComponent
participant Router
User->>WebsitesTable: "Click on name or domain cell"
WebsitesTable->>WebsitesTable: "Check allowView flag"
alt allowView is true
WebsitesTable->>LinkComponent: "Render Next.js Link"
User->>LinkComponent: "Click link"
LinkComponent->>Router: "Navigate to /websites/{id}"
Router-->>User: "Display website dashboard"
else allowView is false
WebsitesTable->>WebsitesTable: "Render plain text"
Note over User,WebsitesTable: Cell is not clickable
end
2 files reviewed, 1 comment
| .row { | ||
| color: inherit; | ||
| display: flex; | ||
| align-items: center; | ||
| width: 100%; | ||
| height: 100%; | ||
| } | ||
|
|
||
| .row:visited { | ||
| color: inherit; | ||
| } |
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.
style: Missing hover state and text decoration for links. Without visual feedback, users won't know the cells are clickable.
| .row { | |
| color: inherit; | |
| display: flex; | |
| align-items: center; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| .row:visited { | |
| color: inherit; | |
| } | |
| .row { | |
| color: inherit; | |
| display: flex; | |
| align-items: center; | |
| width: 100%; | |
| height: 100%; | |
| text-decoration: none; | |
| } | |
| .row:hover { | |
| text-decoration: underline; | |
| } | |
| .row:visited { | |
| color: inherit; | |
| } |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/app/(main)/settings/websites/WebsitesTable.module.css
Line: 1:11
Comment:
**style:** Missing hover state and text decoration for links. Without visual feedback, users won't know the cells are clickable.
```suggestion
.row {
color: inherit;
display: flex;
align-items: center;
width: 100%;
height: 100%;
text-decoration: none;
}
.row:hover {
text-decoration: underline;
}
.row:visited {
color: inherit;
}
```
How can I resolve this? If you propose a fix, please make it concise.
After getting started with Umami I noticed a small, but annoying UX issue I want to fix with this PR.
Problem
When navigating between the projects on
/websitesorsettings/websitesit is more intuitive to click on the row, the name or the domain to open the dashboard vs only being able to click on the "View" button.Solution
Wrapped the name and domain in Link to make the cell clickable.