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

[JENKINS-60866] Remove attributes from f:toggleSwitch #6871

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Jul 17, 2022

See JENKINS-60866.

A quick GH search indicates that nobody uses this element yet (it was introduced only in #5923, apparently as an indiscriminate copy & paste from existing controls), so now's a good time to remove attributes that will be annoying to support. #6852 deprecates the same attributes in f:checkbox.

Proposed changelog entries

  • Remove onclick and disabled attributes from f:toggleSwitch.

Proposed upgrade guidelines

N/A

Submitter checklist

  • (If applicable) Jira issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change) and are in the imperative mood. Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • Appropriate autotests or explanation to why this change has no tests
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadoc, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO") if applicable.
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@mention

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@NotMyFault NotMyFault added the removed This PR removes a feature or a public API label Jul 17, 2022
@NotMyFault NotMyFault added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Jul 18, 2022
@daniel-beck daniel-beck merged commit 2e7c5f9 into jenkinsci:master Jul 21, 2022
@NotMyFault NotMyFault changed the title [JENKINS-60866] Remove stupid attributes from f:toggleSwitch [JENKINS-60866] Remove attributes from f:toggleSwitch Jul 23, 2022
@jasoncwa
Copy link

These features were in use in a non-public facing plugin I maintain. Is there an alternative way to trigger events onclick without these attributes?

@timja
Copy link
Member

timja commented Oct 18, 2022

Yes use JavaScript and register an event listener using an id or class to lookup the component

@daniel-beck
Copy link
Member Author

… as is documented in the other, similar control, whose corresponding PR #6852 is linked in the original PR comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback removed This PR removes a feature or a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants