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

Replace if true by lwc if #900

Merged

Conversation

benjaminloerincz
Copy link
Contributor

What does this PR do?

Instead of if:true, we should use lwc:if.

What issues does this PR fix or reference?

From Render DOM Elements Conditionally:

The legacy if:true and if:false directives are no longer recommended as we intend to deprecate and remove these directives in the future. We recommend that you replace their usage with the lwc:if|elseif|else conditional directives to future-proof your code.

The PR fulfills these requirements:

[] Tests for the proposed changes have been added/updated - not needed.
[X] Code linting and formatting was performed.

Functionality Before

Worked fine.

Functionality After

Still works fine but coding does not use legacy if:true approach anymore.

@benjaminloerincz benjaminloerincz requested a review from a team as a code owner January 30, 2024 15:14
@codecov-commenter
Copy link

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (3e4c9f9) 88.47% compared to head (60f54dd) 92.23%.
Report is 166 commits behind head on main.

Files Patch % Lines
...n/default/lwc/graphqlVariables/graphqlVariables.js 68.75% 5 Missing ⚠️
...default/lwc/graphqlPagination/graphqlPagination.js 89.65% 3 Missing ⚠️
.../main/default/lwc/graphqlRefresh/graphqlRefresh.js 94.28% 2 Missing ⚠️
...c/editRecordScreenAction/editRecordScreenAction.js 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #900      +/-   ##
==========================================
+ Coverage   88.47%   92.23%   +3.76%     
==========================================
  Files         102      120      +18     
  Lines         824     1404     +580     
  Branches       86      224     +138     
==========================================
+ Hits          729     1295     +566     
- Misses         84       99      +15     
+ Partials       11       10       -1     
Flag Coverage Δ
Apex ?
LWC 92.23% <95.21%> (+4.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pozil
Copy link
Contributor

pozil commented Feb 8, 2024

Good catch, thanks for the fix.

@pozil pozil merged commit 6a7cd34 into trailheadapps:main Feb 8, 2024
7 of 8 checks passed
pozil pushed a commit that referenced this pull request Feb 8, 2024
pozil added a commit that referenced this pull request Feb 13, 2024
* build: bump to API v60.0 (#898)

* Add stylesheets recipe (#896)

* Add stylesheets recipe

* Add tab to app

* Fix deploy

* Fix deploy

* Released new package version 04t3t000002YSCIAA4 (#899)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* build(deps-dev): bump prettier from 3.1.1 to 3.2.4

Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.2.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.1.1...3.2.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps-dev): bump eslint-plugin-jest from 27.6.1 to 27.6.3

Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.6.1 to 27.6.3.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v27.6.1...v27.6.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps-dev): bump @lwc/eslint-plugin-lwc from 1.7.0 to 1.7.2

Bumps [@lwc/eslint-plugin-lwc](https://github.com/salesforce/eslint-plugin-lwc) from 1.7.0 to 1.7.2.
- [Release notes](https://github.com/salesforce/eslint-plugin-lwc/releases)
- [Commits](salesforce/eslint-plugin-lwc@v1.7.0...v1.7.2)

---
updated-dependencies:
- dependency-name: "@lwc/eslint-plugin-lwc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps-dev): bump lint-staged from 15.2.0 to 15.2.1

Bumps [lint-staged](https://github.com/okonet/lint-staged) from 15.2.0 to 15.2.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v15.2.0...v15.2.1)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps-dev): bump @salesforce/sfdx-lwc-jest from 3.1.0 to 3.1.1

Bumps [@salesforce/sfdx-lwc-jest](https://github.com/salesforce/sfdx-lwc-jest) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/salesforce/sfdx-lwc-jest/releases)
- [Changelog](https://github.com/salesforce/sfdx-lwc-jest/blob/master/CHANGELOG.md)
- [Commits](salesforce/sfdx-lwc-jest@v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: "@salesforce/sfdx-lwc-jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps-dev): bump @sa11y/jest from 6.2.2 to 6.3.1

Bumps [@sa11y/jest](https://github.com/salesforce/sa11y/tree/HEAD/packages/jest) from 6.2.2 to 6.3.1.
- [Release notes](https://github.com/salesforce/sa11y/releases)
- [Changelog](https://github.com/salesforce/sa11y/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/sa11y/commits/v6.3.1/packages/jest)

---
updated-dependencies:
- dependency-name: "@sa11y/jest"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* remove legacy if:true by lwc:if (#900)

* Released new package version 04t3t000002YSCcAAO (#909)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Alba Rivas <[email protected]>
Co-authored-by: Trailheadapps Bot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Lörincz <[email protected]>
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.

4 participants