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

KeybindRecorder #511

Open
wants to merge 11 commits into
base: v4.9.0
Choose a base branch
from
Open

Conversation

yofukashino
Copy link
Contributor

@yofukashino yofukashino commented Jul 6, 2023

added custom key bind recorder to components

its preview
image

Closes: #458

Copy link
Member

@FedeIlLeone FedeIlLeone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now this, I'll see the rest later.

@@ -0,0 +1,90 @@
.rp-keybind-container {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Speaking of how the keybind recorder looks, it needs to be as similar as possible to how Discord has it. Remember to use CSS variables.

style={{ width: "24px", height: "24px" }}>
<path d="M19.745 5a2.25 2.25 0 0 1 2.25 2.25v9.505a2.25 2.25 0 0 1-2.25 2.25H4.25A2.25 2.25 0 0 1 2 16.755V7.25A2.25 2.25 0 0 1 4.25 5h15.495Zm-2.495 9.5H6.75l-.102.007a.75.75 0 0 0 0 1.486L6.75 16h10.5l.102-.007a.75.75 0 0 0 0-1.486l-.102-.007ZM16.5 11a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-2.995 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-3 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-3 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM6 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm2.995 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm3 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm3 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm3 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" />
</svg>
<Text.Normal className="button-text">Record Keybind</Text.Normal>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i18n missing here and applies to other texts. You can use Discord's strings.

event.stopPropagation();
props.toggleRecording();
}}>
<svg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a new component for each icon, they don't need to be exported, just to make this clear.

);
};

export default class KeybindRecorder extends React.Component<KeybindProps, KeybindState> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to export two components from this file. One is KeybindRecorder, the clean component without any of our modifications, which must be as similar as possible to the original. The other is KeybindRecorderItem, must be a KeybindRecorder wrapped in a FormItem.

@FedeIlLeone FedeIlLeone added enhancement New feature or request semver: minor Requires a minor semver version bump labels Jul 7, 2023
@FedeIlLeone FedeIlLeone added this to the v4.6.0 milestone Jul 7, 2023
@FedeIlLeone FedeIlLeone changed the title Keybind item KeybindRecorder Jul 7, 2023
@asportnoy asportnoy changed the base branch from main to v4.6.0 July 10, 2023 14:46
@asportnoy asportnoy modified the milestones: v4.6.0, v4.7.0 Aug 18, 2023
@asportnoy asportnoy changed the base branch from v4.6.0 to v4.7.0 August 18, 2023 18:07
@asportnoy asportnoy added the addon development Relates to developing addons, eg APIs or scripts label Aug 29, 2023
@asportnoy asportnoy changed the base branch from v4.7.0 to v4.8.0 October 12, 2023 01:37
@asportnoy asportnoy modified the milestones: v4.7.0, v4.8.0 Oct 12, 2023
@FedeIlLeone FedeIlLeone removed this from the v4.8.0 milestone Jul 13, 2024
@FedeIlLeone FedeIlLeone deleted the branch replugged-org:v4.9.0 November 21, 2024 20:39
@FedeIlLeone FedeIlLeone reopened this Nov 21, 2024
@FedeIlLeone FedeIlLeone changed the base branch from v4.8.0 to v4.9.0 November 21, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon development Relates to developing addons, eg APIs or scripts enhancement New feature or request semver: minor Requires a minor semver version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keybind recorder
3 participants