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

Adding KeyBinding and MouseBinding #425

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

rtazaki
Copy link
Contributor

@rtazaki rtazaki commented Mar 24, 2024

  • Since I created a new page, I modified sidebars.js.
  • I didn't know how to preview the Tabs tag, so I implemented it by feel.
  • I've never used docusaurus before because I'm not confident in multiple languages, but is it something that document creators must do?

@stevemonaco
Copy link
Collaborator

* I've never used docusaurus before because I'm not confident in multiple languages, but is it something that document creators must do?

For changes more extensive than modifying/adding words in an existing doc, probably. The CI runs checks for valid syntax/imports, checks md anchor links, image links, etc.

Setting up Docusaurus is easy, even if you don't do much web like me. Check the readme on the main page of this repo. Basically: Install Node.js, clone your forked docs repo, npm install, npx docusaurus start. This will start a local web server in dev mode and Docusaurus will hot reload pages as you modify (except the sidebar, IIRC, need to restart for that). You ideally build locally (npm run build --if-present) like the CI does before committing as dev mode will miss certain things like broken anchors.

rtazaki added 2 commits March 28, 2024 23:26
- Fixed the issue and confirmed it with Docusaurus.
@rtazaki
Copy link
Contributor Author

rtazaki commented Mar 28, 2024

  • I understand what Docusaurus is used for right now.
  • This is to see how the modified document will actually look.
    (Until now, I had only checked md files using the editor's preview function.)
  • By the way, multiple languages, but is it something that document creators must do?
    (i.e. do I need to sync the i18n folder?)

@rtazaki rtazaki requested a review from stevemonaco March 28, 2024 14:58
@stevemonaco
Copy link
Collaborator

* By the way, multiple languages, but is it something that document creators must do?
  (i.e. do I need to sync the i18n folder?)

If the PR is accepted, then localizers will work on localizing the text afterwards. There aren't any localized images. At some point soon, I will probably sync the diffs manually for non-localizable parts (ie. code).

I would prefer to see some reasoning. eg. Why MouseBinding doesn't work. (Is this because the control itself handles it before it can bubble? I'm not familiar with this exact area, so I won't accept/reject). We're also trying to move docs away from ReactiveUI usage though we haven't settled on any particular "standard" VM structure.

@rtazaki
Copy link
Contributor Author

rtazaki commented Mar 29, 2024

* By the way, multiple languages, but is it something that document creators must do?
  (i.e. do I need to sync the i18n folder?)

If the PR is accepted, then localizers will work on localizing the text afterwards. There aren't any localized images. At some point soon, I will probably sync the diffs manually for non-localizable parts (ie. code).

I would prefer to see some reasoning. eg. Why MouseBinding doesn't work. (Is this because the control itself handles it before it can bubble? I'm not familiar with this exact area, so I won't accept/reject). We're also trying to move docs away from ReactiveUI usage though we haven't settled on any particular "standard" VM structure.

  1. Mouse binding exists in standard WPF but is not implemented in AvaloniaUI.
    Example of a document I wrote: want to execute a command by double-clicking the mouse.
    =>
    MouseBinding
    Avalonia.Input
    <MouseBinding Gesture="LeftDoubleClick">

  2. The goal is to show as "standard" an implementation as possible, without depending on any particular framework.
    But, resulting in an unrealistic amount of code. It is trade off.
    Example:

  • Is it troublesome to mash fruit in a "mortar and pestle"?
  • Is it troublesome to write a note saying "any brand is fine" every time you use a food processor?
    =>
    [Reactive], .Execute(null);, ReactiveCommand
    Three methods are typically difficult to implement: with CommunityToolkit, with ReactiveUI, and without both.
    and even if you could implement it, the documentation won't help developers understand the framework.
    (Is there an option to avoid it by not writing about ViewModel?)
  1. Rather than writing abstract documentation, I would like to leave a concrete and short example. I hope it provides inspiration for what's possible, even if it becomes a legacy someday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants