Skip to content

Commit 391d28e

Browse files
kalu5alexdln
andauthored
fix: restore default cursor and add commitment in docs (#1261)
Co-authored-by: Alex Savelyev <91429106+alexdln@users.noreply.github.com> Co-authored-by: Vordgi <sasha2822222@gmail.com>
1 parent 859cc4f commit 391d28e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ This focus helps guide our project decisions as a community and what we choose t
4141
- [Naming conventions](#naming-conventions)
4242
- [Vue components](#vue-components)
4343
- [Internal linking](#internal-linking)
44+
- [Cursor and navigation](#cursor-and-navigation)
4445
- [RTL Support](#rtl-support)
4546
- [Localization (i18n)](#localization-i18n)
4647
- [Approach](#approach)
@@ -392,6 +393,18 @@ For package links, use the auto-imported `packageRoute()` utility from `app/util
392393
| `~username` | `/~:username` | `username` |
393394
| `~username-orgs` | `/~:username/orgs` | `username` |
394395

396+
### Cursor and navigation
397+
398+
**npmx** uses `cursor: pointer` only for links to match users’ everyday experience. For all other interactive elements, including buttons, use the default cursor (_or another appropriate cursor to indicate state_).
399+
400+
> [!NOTE]
401+
> A link is any element that leads to another content (_go to another page, authorize_)
402+
> A button is any element that operates an action (_show tooltip, open menu, "like" package, open dropdown_)
403+
> If you're unsure which element to use - feel free to ask question in the issue or on discord
404+
405+
> [!IMPORTANT]
406+
> Always Prefer implementing navigation as real links whenever possible. This ensures they can be opened in a new tab, shared or reloaded, and so the same content is available at a stable URL
407+
395408
## RTL Support
396409

397410
We support `right-to-left` languages, we need to make sure that the UI is working correctly in both directions.

app/components/Button/Base.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ defineExpose({
2828
<template>
2929
<button
3030
ref="el"
31-
class="group cursor-pointer gap-x-1 items-center justify-center font-mono border border-border rounded-md transition-all duration-200 disabled:(opacity-40 cursor-not-allowed border-transparent)"
31+
class="group gap-x-1 items-center justify-center font-mono border border-border rounded-md transition-all duration-200 disabled:(opacity-40 cursor-not-allowed border-transparent)"
3232
:class="{
3333
'inline-flex': !block,
3434
'flex': block,

0 commit comments

Comments
 (0)