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

warn: ability to hide linked article and reason #1604

Merged

Conversation

NovemLinguae
Copy link
Member

@NovemLinguae NovemLinguae commented Jun 15, 2022

Fixes #1408
Fixes #1538
Related #1537

When warning a user with uw-editsummary2, hides the "linked page" and "reason" text boxes.

I also created infrastructure to easily mark other templates with hideLinkedPage and hideReason, if we need to in the future.

I also added unit tests. I changed some unit test configuration files so that in the future, if we want to unit test modules, it will be easier.

Also renamed a couple variables.

image

@github-actions github-actions bot added the tests label Jun 16, 2022
@NovemLinguae
Copy link
Member Author

@siddharthvp. Hey there. I wrote some unit tests for what is basically a private method. Think it's OK to keep them in or should I remove them? I know unit tests for private methods are sometimes considered a code smell.

@siddharthvp
Copy link
Member

@NovemLinguae I think it's perfectly ok. Modules don't really have any "public" methods so this is the only way we can unit-test anything.

@NovemLinguae NovemLinguae merged commit 7d62a62 into wikimedia-gadgets:master Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

warn: option to suppress "linked page" Small bug with {{Summary2}}
2 participants