Skip to content

Commit 0d1a725

Browse files
committed
chore: describe cursor and navigation in contributing guide
1 parent a854ea8 commit 0d1a725

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,22 @@ Query parameters work as expected:
356356
<NuxtLink :to="{ name: 'compare', query: { packages: pkg.name } }">Compare</NuxtLink>
357357
```
358358

359+
### Cursor and navigation
360+
361+
We prefer consistency in user everyday experience
362+
363+
npmx uses `cursor-pointer` only for links. For all other elements, including buttons, use the default cursor (_or other appropriate cursors to show state_).
364+
365+
**What counts as a link**
366+
367+
A link is any element that change or show meaningful content:
368+
369+
- **Not meaningful content:** burger menu, "likes" button - the user does not get substantive information from them.
370+
- **Meaningful content:** a dialog with a chart, auth button, tabs with new data—they convey new or important information.
371+
372+
> [!IMPORTANT]
373+
> Always prefer implementing such changes as real links so they can be opened in a new tab, shared or reloaded, and so the same content is available at a stable URL.
374+
359375
#### Package routes
360376

361377
For package links, use the auto-imported `packageRoute()` utility from `app/utils/router.ts`. It handles scoped/unscoped packages and optional versions:

0 commit comments

Comments
 (0)