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

Json formatting and reorder #2223

Merged
merged 6 commits into from
Apr 9, 2024

Conversation

Cipulot
Copy link
Collaborator

@Cipulot Cipulot commented Apr 2, 2024

Description

This PR aims to align the formatting and key order of the JSON merged in the repository.

The formatting of the JSON follows the following rules:

  • indent_style = space
  • indent_size = 2
  • end_of_line = lf
  • charset = utf-8
  • trim_trailing_whitespace = true
  • insert_final_newline = true

These rules, in combination with the default formatter for JSON files found in VSCode and similar apps, introduce additional line usage, in cases like the following:
image
image

While this might reduce the final readability, it's far easier to have the auto-formatted as the base approved layout, rather than count on the auto-formatted to be modified again to have 1 liner again.

The key has been consolidated as follows:

  • "name",
  • "vendorId"
  • "productId"
  • "firmwareVersion"
  • "matrix"
    • "rows"
    • "cols"
  • "customFeatures"
  • "customKeycodes"
  • "keycodes"
  • "menus"
  • "lighting" (for src boards)
  • "layouts"
    • "labels"
    • "presets"
    • "keymaps"

This order allows for a better flow of information, as well as aligning all the JSON already merged in the repository to follow the same order. This order is the preferred and requested from now onwards, change the documentation to indicate the preferred order will be done after this PR.

Subsequently, the PR checklist will receive additional checks for code formatting and key order.

@Cipulot Cipulot requested a review from Xelus22 April 2, 2024 13:24
@Cipulot Cipulot merged commit 54956d9 into the-via:master Apr 9, 2024
2 checks passed
@syrah94
Copy link

syrah94 commented Aug 15, 2024

hello xelus22 and cipulot, this is Syrah from qwertykeys, we have been following a keyboard firmware developing team and their progresses - and we'd want to bring some of the feature they developed into qmk/via so we'd love to know how should we do this? is there a process for one to "become" the code reviewer? we wish to do our part to contribute and return to the community but I am not sure where to send the message! please let me know the best way to reach out if this is disturbing 🙏

@Cipulot
Copy link
Collaborator Author

Cipulot commented Aug 15, 2024

Hello there @syrah94 .
In case of addition suggestions, the usual policy is to open an Issue or a PR draft and use that as a discussion platform.
From what I can gasp from your message that would probably have to target the VIA App, and not the keyboards repo.

In any case you can reach us through the VIA discord server and from there through DMs in case you need to.
Here is the VIA discord server link: https://discord.gg/nJZ8Vy7s

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.

3 participants