Skip to content

Commit 388ab2b

Browse files
authored
Merge pull request Expensify#71372 from Expensify/tgolen-route-parameters
[No QA] Add some direction for readable params
2 parents 3a10c20 + dddb6f7 commit 388ab2b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

contributingGuides/philosophies/ROUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ Aim for the shortest possible URL that is also still human readable.
2121
Exceptions:
2222
- When abbreviated paths are used in specific instances like `r/` (for reports) and `a/` (for accounts) for strategic purposes
2323

24+
### - SHOULD use human readable names before using IDs
25+
Example:
26+
1. `domain/expensify.com/settings` - It's better to use the domain name "expensify.com" rather than an ID because it is readable, won't ever change, and is not a privacy or security concern
27+
28+
Exceptions:
29+
- When there would be PII (personally identifiable information) that would leak in the URL like email addresses, use an ID instead
30+
- When the name can be updated but the path remains the same (eg. a workspace name), use an ID instead
31+
2432
### - MUST use kebab-case for all parts of a URL (eg. words separated by hyphens)
2533
### - MUST use all lower case words
2634
### - MUST be defined in `ROUTES.ts`

0 commit comments

Comments
 (0)