-
Notifications
You must be signed in to change notification settings - Fork 1
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
Port upstream commits into lavender #9
Changes from all commits
828a5e4
e682b69
f37901f
23e0d5e
78797bc
3c3453b
c598e35
64ac702
897dd86
8f36f3d
8499fd6
c32e281
a698d3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
"varsIgnorePattern": "^_" | ||
} | ||
], | ||
"solid/jsx-no-undef": [0], | ||
"require-jsdoc": [ | ||
"warn", | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ cd lavender | |
# git submodule init && git submodule update | ||
|
||
# install all packages | ||
pnpm i | ||
pnpm i --frozen-lockfile | ||
|
||
# build deps: | ||
pnpm build:deps | ||
|
@@ -55,7 +55,7 @@ Any edits to the `uprzying.js` codebase will immediately be reflected while deve | |
|
||
```bash | ||
# install packages | ||
pnpm i | ||
pnpm i --frozen-lockfile | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Refer to my previous comment |
||
|
||
# build dependencies | ||
pnpm build:deps | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,6 @@ import MdNotificationsOff from "@material-design-icons/svg/filled/notifications_ | |
import MdShield from "@material-design-icons/svg/filled/shield.svg?component-solid"; | ||
import MdSmartToy from "@material-design-icons/svg/filled/smart_toy.svg?component-solid"; | ||
import MdSpa from "@material-design-icons/svg/filled/spa.svg?component-solid"; | ||
import MdSchedule from "@material-design-icons/svg/filled/schedule.svg?component-solid"; | ||
|
||
import { MessageContextMenu } from "../../../menus/MessageContextMenu"; | ||
import { | ||
|
@@ -103,6 +102,7 @@ export function Message(props: Props) { | |
} | ||
avatar={ | ||
<AvatarContainer | ||
// @ts-expect-error this is a hack; replace with plain element & panda-css | ||
use:floating={floatingUserMenusFromMessage(props.message)} | ||
> | ||
<Avatar size={36} src={props.message.avatarURL} /> | ||
|
@@ -164,20 +164,17 @@ export function Message(props: Props) { | |
</Tooltip> | ||
</Match> | ||
<Match when={props.message.webhook}> | ||
<Tooltip content={t("app.main.channel.webhook")} placement="top"> | ||
<MdCloud {...iconSize(16)} /> | ||
</Tooltip> | ||
</Match> | ||
<Match when={props.message.webhook}> | ||
<Tooltip content={t("app.main.channel.webhook")} placement="top"> | ||
<Tooltip | ||
content={ | ||
"Webhook" | ||
|
||
// TODO: missing i18n | ||
} | ||
placement="top" | ||
> | ||
<MdCloud {...iconSize(16)} /> | ||
</Tooltip> | ||
</Match> | ||
<Match when={props.message.member?.timeout}> | ||
<Tooltip content={`User has been timed out for ${dayjs(props.message.member?.timeout).toNow(true)}`} placement="top"> | ||
<MdSchedule {...iconSize(16)} /> | ||
</Tooltip> | ||
</Match> | ||
Comment on lines
-176
to
-180
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you seem to have accidentally removed the timeout indicator |
||
<Match when={props.message.isSuppressed}> | ||
<Tooltip content={"Silent" /* TODO: i18n */} placement="top"> | ||
<MdNotificationsOff {...iconSize(16)} /> | ||
|
@@ -207,11 +204,10 @@ export function Message(props: Props) { | |
</Tooltip> | ||
</NewUser> | ||
</Match> | ||
{/* pronounce example | ||
<Match when={props.message.authorId === "01EX2NCWQ0CHS3QJF0FEQS1GR4"}> | ||
<Match when={props.message.authorId === "01JENZCKGRKNQEN0W3XXWTJQS7"}> | ||
<span /> | ||
<span>he/him · </span> | ||
</Match> */} | ||
<span>she/her · </span> | ||
</Match> | ||
</Switch> | ||
} | ||
compact={ | ||
|
@@ -235,10 +231,10 @@ export function Message(props: Props) { | |
menuGenerator={(user) => | ||
user | ||
? floatingUserMenus( | ||
user!, | ||
// TODO: try to fetch on demand member | ||
props.message.server?.getMember(user!.id) | ||
) | ||
user!, | ||
// TODO: try to fetch on demand member | ||
props.message.server?.getMember(user!.id) | ||
) | ||
: {} | ||
} | ||
isServer={!!props.message.server} | ||
|
@@ -260,7 +256,9 @@ export function Message(props: Props) { | |
</For> | ||
</Show> | ||
<Reactions | ||
reactions={props.message.reactions} | ||
reactions={ | ||
props.message.reactions as never as Map<string, Set<string>> | ||
} | ||
interactions={props.message.interactions} | ||
userId={client().user!.id} | ||
addReaction={react} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ export default function ServerOverview(props: ServerSettingsProps) { | |
</FormGroup> | ||
<FormGroup> | ||
<CategoryButton | ||
description="Server can be joined from Discover" | ||
description="Space can be joined from Discover" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: i18n |
||
icon={<BiRegularGlobe size={24} />} | ||
action={ | ||
<Checkbox | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ const Config: SettingsConfiguration<Server> = { | |
title(key) { | ||
const t = useTranslation(); | ||
return t( | ||
`app.settings.server_pages.${key.replaceAll("/", ".")}.title`, | ||
`app.settings.server_pages.${key.replaceAll("/", ".")}.title` as any, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Um, doesn't eslint complain about using any here? Either way, the proper type here should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its either eslint warning or TS error |
||
undefined, | ||
key | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,9 @@ export default function Keybinds() { | |
|
||
const translateCombo = (combo: KeyCombo, short: boolean) => | ||
combo | ||
.map((key) => t(`keys.${key}.${short ? "short" : "full"}`, {}, key)) | ||
.map((key) => | ||
t(`keys.${key}.${short ? "short" : "full"}` as any, {}, key) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, |
||
) | ||
.join("+"); | ||
|
||
const translateSequence = (sequence: KeyComboSequence, short: boolean) => | ||
|
@@ -94,8 +96,12 @@ export default function Keybinds() { | |
.flat() | ||
.map((action) => [ | ||
action, | ||
t(`app.settings.pages.keybinds.action.${action}.description`) as string, | ||
t(`app.settings.pages.keybinds.action.${action}.title`) as string, | ||
t( | ||
`app.settings.pages.keybinds.action.${action}.description` as any | ||
) as string, | ||
t( | ||
`app.settings.pages.keybinds.action.${action}.title` as any | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the template string being casted to It's driving me crazy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it isn't, it throws TS2345, presumably due to a nonexistent key? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did see some changes on the translation function so maybe it's due to those? Reviewing through github is a bit of a pain, let alone doing it through vscode (i always forget how to add comments on prs), so I might pull this locally and check what type it expects There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Have fun with that |
||
) as string, | ||
...state.keybinds | ||
.getKeybinds() | ||
[action].flatMap((sequence) => [ | ||
|
@@ -135,7 +141,7 @@ export default function Keybinds() { | |
<For each={filteredData()}> | ||
{([category, actions]) => ( | ||
<CategoryCollapse | ||
title={t(`app.settings.pages.keybinds.category.${category}`)} | ||
title={t(`app.settings.pages.keybinds.category.${category}` as any)} | ||
// TODO: open={category !== "advanced"} | ||
> | ||
<Column group="6px"> | ||
|
@@ -144,12 +150,14 @@ export default function Keybinds() { | |
<ActionCategory> | ||
<CategoryButton | ||
description={t( | ||
`app.settings.pages.keybinds.action.${action}.description` | ||
`app.settings.pages.keybinds.action.${action}.description` as any | ||
)} | ||
action={<BiSolidPlusCircle size={24} />} | ||
onClick={() => addKeybind(action)} | ||
> | ||
{t(`app.settings.pages.keybinds.action.${action}.title`)} | ||
{t( | ||
`app.settings.pages.keybinds.action.${action}.title` as any | ||
)} | ||
</CategoryButton> | ||
<For each={state.keybinds.getKeybinds()[action]}> | ||
{(sequence, index) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is
--frozen-lockfile
here?When developing, it's important that we keep the lockfile up to date,
--frozen-lockfile
should only be used in CI/CD environments (imo)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have 0 clue, ask the guy who put it on upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I think its less for developers and more for users that just want newer commits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, maybe.
Might add a disclaimer on the README then