Nothing Special   »   [go: up one dir, main page]

Skip to content
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

add support for named sequences (closes #43) #45

Merged
merged 13 commits into from
Oct 16, 2022
Prev Previous commit
Next Next commit
clean up biggest rough edges around sequence ui
  • Loading branch information
delan committed Apr 3, 2022
commit 28660af82ed91ef16b4510be645f5dc8a7d0cc5b
17 changes: 11 additions & 6 deletions src/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
getAliasValue,
getNameProperty,
getString,
isEmoji,
isEmojiPresentation,
} from "./data";
import { pointsToString } from "./encoding";
Expand Down Expand Up @@ -148,7 +149,7 @@ function Detail({ search }: { search: () => void }) {
<a href={toFragment(points)} >
{ifSequence(
points,
(_) => "FIXME",
(_) => "(sequence)",
(x) => pointToName(data, x),
)}
</a>
Expand All @@ -168,6 +169,7 @@ function Detail({ search }: { search: () => void }) {

function PointDetails({ point }: { point: number }) {
const data = useContext(DataContext)!;
const emoji = isEmoji(data, point);

return (
<>
Expand All @@ -185,10 +187,13 @@ function PointDetails({ point }: { point: number }) {
<StringPair field="hjsn" label="Hangul Jamo short name" />
<StringPair field="uhdef" label="Unihan kDefinition" />
<StringPair field="uhman" label="Unihan kMandarin" />
<dt className="compact">Emoji_Presentation</dt>
<dd className="compact">
{isEmojiPresentation(data, point) ? "Yes" : "No"}
</dd>
{emoji && <dt>Emoji properties</dt>}
{emoji && (
<dd>
Emoji_Presentation?{" "}
{isEmojiPresentation(data, point) ? <>Yes</> : <strong>No</strong>}
</dd>
)}
</dl>
</>
);
Expand Down Expand Up @@ -401,7 +406,7 @@ function SearchResultLabel({
<>
{pointsToYouPlus(points)}
{space}
{`FIXME`}
{`(sequence)`}
</>
);
case "name":
Expand Down