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

Tabs should be permitted, maybe even mandatory. #73

Open
hexylena opened this issue Nov 14, 2022 · 5 comments
Open

Tabs should be permitted, maybe even mandatory. #73

hexylena opened this issue Nov 14, 2022 · 5 comments

Comments

@hexylena
Copy link
Member

They're better for accessibility:

I've never understood IUC's demand for them (they're "best practice" but somehow also 100% mandatory), and I think we should change this. Clients can set tabs to any width they personally prefer, you can have 2 or 8 or 4, and folks that want them for accessibility reasons will finally have them.

(sorry to restart this old argument.)

@peterjc
Copy link
Contributor

peterjc commented Nov 14, 2022

Does the IUC standards currently actually talk about tabs versus spaces? I had a search but couldn't find anything.

I note Python has the PEP8 coding standard and ecosystem of tools like code-formatter black which use spaces not tabs.

Which file formats do you have in mind here? XML and JSON? Everything? Everything except Python?

@hexylena
Copy link
Member Author

It states Use 4 spaces for indentation under the best practice file. Which has sometimes been treated as a requirement for tool submissions rather than simply a "best practice".

  • XML is the main focus for me. It makes up most of the repository's codebase, and is the primary thing we're reviewing a lot of the time. Making that main article more accessible is good
  • Python's PEP8 and black seem very resistant to tabs which is too bad, but that's maybe a separate discussion for a separate avenue than this though.
  • JSON sure, why not, let's include that (but I don't think that was covered by the old rules and you were free to do as you like.)

I'd be already happier if this PR resolved with accepting tabs in addition to 4 spaces, as long as the author is consistent.
That would be a relatively tiny change I think and results in the least amount of discussions, and improves accessibility marginally for the affected users who are contributing / working on their own tools.

@peterjc
Copy link
Contributor

peterjc commented Nov 14, 2022

Ah, I searched for terms like tabs, not indentation.

I would have no objection to recommending tabs for indentation in the Galaxy tool XML files.

I have embraced black for auto formatting my Python code, and would happily do the same for XML.

@peterjc
Copy link
Contributor

peterjc commented Nov 14, 2022

Oh, and your compromise of tabs or 4-spaces in XML as long as consistent is good too.

@hexylena
Copy link
Member Author

I have embraced black for auto formatting my Python code, and would happily do the same for XML.

Likewise, it's made things a lot easier.

Ok, between the thumbs up and your comments, I'll make a PR proposing the change then!

hexylena added a commit that referenced this issue Nov 14, 2022
While still allowing spaces, and just promoting consistency.
Fixes #73
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 a pull request may close this issue.

2 participants