Skip to content

Implement basic Codex styles to DataTables #871

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

Merged
merged 5 commits into from
Dec 17, 2024

Conversation

alistair3149
Copy link
Contributor

@alistair3149 alistair3149 commented Dec 8, 2024

Recording.2024-12-08.044136.mp4

I will make a follow-up patch to clean up the icons

@alistair3149 alistair3149 changed the title Implement Codex styles to DataTables [WIP] Implement Codex styles to DataTables Dec 8, 2024
@alistair3149 alistair3149 changed the title [WIP] Implement Codex styles to DataTables Implement basic Codex styles to DataTables Dec 8, 2024
@alistair3149 alistair3149 marked this pull request as ready for review December 8, 2024 09:42
@JeroenDeDauw
Copy link
Member

@thomas-topway-it could you have a look at this?

lengthMenuLabels[showAll] = mw.msg( 'srf-ui-datatables-label-rows-all' );
}
// Format value into readable label
for (var i = 0; i < lengthMenuLabels.length; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

There is some inconsistent code style spacing in the new code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was my bad, I was used to the spacing scheme in other MW projects.
Would it be helpful to set up eslint and stylelint for the SRF down the line? There would probably be a lot of violations but it would be great to enforce some consistency in code styling.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, the code here does not use the normal MW style? I would just use the standard MW style. The code here comes from all kinds of random contributors, so not surprising it deviates at places.

Yes, having some CS rules could help... though I wonder how much they would get in the way here. Having the option to merge something slightly inconsistent is nice, because repeatedly harassing new contributors over spaces isn't likely to endear them to the project. So shrug

Copy link
Contributor Author

@alistair3149 alistair3149 Dec 17, 2024

Choose a reason for hiding this comment

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

Almost all the JS that I worked on within SRF isn't using standard code styles (e.g. whitespace in line 565 is standard MW styles, the rest of the files without whitespace isn't). It might be safe to assume that majority of the code do not conform to the styles based on the age of the code themselves.

I am a bit torn about this because if we are to enable CS rules, the CI will light up like a Christmas tree... I don't have the bandwidth to do it at the moment but perhaps some day in the future.

@JeroenDeDauw JeroenDeDauw merged commit bf529a4 into SemanticMediaWiki:master Dec 17, 2024
1 of 2 checks passed
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