Skip to content

web: codemod the `<button />` element to the `<Button />` component

Administrator requested to merge vb/codemod-button-element into main

Created by: valerybugakov

Context

Automated migration of the <button /> element to the <Button /> Wildcard component powered by the codemod created in the this repo. The codemod implementation is coming to the repo via a series of pull requests started here. I will add the reference here once it's live.

Reviewer 👋

This PR contains:

  1. Three preparation commits done manually: #1, #2, #3. Additional preparations were made here: https://github.com/sourcegraph/sourcegraph/pull/29277.
  2. One commit generated by the codemod: codemod the <button /> element.
  3. One commit generated by jest: update jest snapshots.
  4. The final clean-up commit created manually: update className props.

Notes

  • Only <button /> was transformed in this PR. Other components (like <Link className="btn" />) and elements like <a className="btn" /> will be codemodded in a follow-up PR.
  • Classes btn-icon, btn-block will be addressed separately.

Part of https://github.com/sourcegraph/sourcegraph/issues/29318. Related to https://github.com/sourcegraph/codemod/issues/31.

Merge request reports

Loading