-
-
Notifications
You must be signed in to change notification settings - Fork 949
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
docs(internet): document emoji type values #1732
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #1732 +/- ##
=======================================
Coverage 99.64% 99.64%
=======================================
Files 2340 2340
Lines 242624 242624
Branches 1103 1103
=======================================
Hits 241772 241772
Misses 831 831
Partials 21 21
|
TBH, I don't see the problem here. The documentation clearly states that Maybe a better improvement would be to link to |
I feel that's a typescript way of thinking. If you're using the library in JavaScript it's just a list of strings and it's unnecessary to know that it's a custom type. |
I'm currently unsure what the best representation is. Since the type is only used once it feels tedious to hide it behind a link. |
It sure is and I'm all for it. If you don't use typescript in 2023, that's on you.
That's something that sounds super cool to me (but also very work intensive for a feature used that less). |
That's a bad experience on mobile. I like having the possible values listed so for example you can quickly copy paste from the docs. If let's say you want all types EXCEPT flags you can copy paste from the list then delete flags. |
Also, I'm not always in an IDE when i want to refer to documentation. For example, I might be reviewing someone else's code in a PR on mobile, or just browsing the web-based documentation before I start implementing a feature; |
Does |
In |
I think it's because it is a simple type we have to adjust the code to handle arrays thereof as well. |
IMO this is a much more valued fix that we should try to address |
i totally get where you're coming from in wanting to automate this, but... Looks like fixing this "properly" requires editing the Whereas editing the docstrings is something that even a new contributor can easily do. So i think one should not let "perfect be the enemy of good", and in general the bar to acceptance for docs improvements should be fairly low. As there's only a few places in the code with such enum-type string array options, might just want to keep it manual for now to avoid distracting core contributors from other more important v8 work. |
I'm very happy that someone external say what I was trying to say for quite some month now... |
The (seeded) test logic is easy IMO, so I won't comment further on this.
(I'm also a docs editor in another project and NONE of the developers or users submitted any real PRs to update the documentation since the last two major versions, ~2+ years, despite requesting it multiple times in writing and staff meetings) |
I wrote a short script that checks our repo for all occurances where the type name is used instead of a union: Diff (click to expand)Please ignore the incomplete transformations. - "ColorFormat",
+ "'binary' | 'css' | NumberColorFormat",
- "ColorFormat",
+ "'binary' | 'css' | NumberColorFormat",
- "ColorFormat",
+ "'binary' | 'css' | NumberColorFormat",
- "ColorFormat",
+ "'binary' | 'css' | NumberColorFormat",
- "ColorFormat",
+ "'binary' | 'css' | NumberColorFormat",
- "ColorFormat",
+ "'binary' | 'css' | NumberColorFormat",
- "Casing",
+ "'lower' | 'mixed' | 'upper'",
- "'hex' | ColorFormat",
+ "'binary' | 'css' | NumberColorFormat | 'hex'",
- "(parameters: any[]) => RecordKey",
+ "(parameters: any[]) => number | string | symbol",
- "(obj: Record<RecordKey, RecordKey>, key: RecordKey) => -1 | 0",
+ "(obj: Record<number | string | symbol, number | string | symbol>, key: number | string | symbol) => -1 | 0",
- "RecordKey | RecordKey[]",
+ "(number | string | symbol)[] | number | string | symbol",
- "Record<RecordKey, RecordKey>",
+ "Record<number | string | symbol, number | string | symbol>",
- "readonly Object[]",
+ "readonly { ... }[]",
- "readonly EmojiType[]",
+ "readonly ('activity' | 'body' | 'flag' | 'food' | 'nature' | 'object' | 'person' | 'smiley' | 'symbol' | 'travel')[]",
- "readonly HTTPStatusCodeType[]",
+ "readonly ('clientError' | 'informational' | 'redirection' | 'serverError' | 'success')[]",
- "HTTPProtocolType",
+ "'http' | 'https'",
- "readonly LiteralUnion<AlphaChar, string>[] | string",
+ "readonly ('A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | string)[] | string",
- "Casing",
+ "'lower' | 'mixed' | 'upper'",
- "readonly LiteralUnion<AlphaNumericChar, string>[] | string",
+ "readonly ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | string)[] | string",
- "Casing",
+ "'lower' | 'mixed' | 'upper'",
- "readonly LiteralUnion<NumericChar, string>[] | string",
+ "readonly ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | string)[] | string",
- "Casing",
+ "'lower' | 'mixed' | 'upper'",
- "readonly LiteralUnion<AlphaChar, string>[] | string",
+ "readonly ('A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | string)[] | string",
- "Casing",
+ "'lower' | 'mixed' | 'upper'",
- "readonly LiteralUnion<AlphaNumericChar, string>[] | string",
+ "readonly ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | string)[] | string",
- "Casing",
+ "'lower' | 'mixed' | 'upper'",
- "readonly LiteralUnion<NumericChar, string>[] | string",
+ "readonly ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | string)[] | string", |
i think you really need a human to review these and see where it makes sense to spell it out. For example, spelling out the EmojiType and HTTPStatusCodeType values is useful, whereas spelling out |
I will merge this for the later docs additions and temp type listing. |
Thanks for your contributions! ❤️ |
Currently there's no way to see the possible emoji type values without looking at the source code
Adds list to docs:
