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

Improve Page Editor utils method names #8752

Merged
merged 2 commits into from
Jul 5, 2024

Conversation

twschiller
Copy link
Contributor

@twschiller twschiller commented Jul 5, 2024

What does this PR do?

  • Improve Page Editor utils method names
  • Avoid using select outside of Redux context
  • foundation -> starter brick
  • block -> brick

For more information on our expectations for the PR process, see the
code review principles doc

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.24%. Comparing base (8318d74) to head (870a6c3).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8752      +/-   ##
==========================================
- Coverage   74.24%   74.24%   -0.01%     
==========================================
  Files        1332     1332              
  Lines       40817    40826       +9     
  Branches     7634     7635       +1     
==========================================
+ Hits        30306    30312       +6     
- Misses      10511    10514       +3     

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

@twschiller twschiller self-assigned this Jul 5, 2024
@twschiller twschiller requested review from fungairino, mnholtz and BLoe July 5, 2024 14:30
@@ -252,14 +265,3 @@ export function selectPageEditorDimensions() {
window.innerWidth > window.innerHeight ? "landscape" : "portrait",
};
}

export function selectModMetadata(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to collocate with other mod metadata-related methods

Copy link

github-actions bot commented Jul 5, 2024

Playwright test results

passed  84 passed
skipped  2 skipped

Details

report  Open report ↗︎
stats  86 tests across 30 suites
duration  12 minutes, 41 seconds
commit  870a6c3

Skipped tests

chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
edge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options

@@ -44,6 +44,17 @@ import AddDynamicTextSnippet from "@/bricks/effects/AddDynamicTextSnippet";
import { type PackageUpsertResponse } from "@/types/contract";
import { type UnsavedModDefinition } from "@/types/modDefinitionTypes";

export function mapModDefinitionUpsertResponseToModMetadata(
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: are we also referring to Packages as ModDefinitions? Maybe this could instead be mapPackageUpsertResponseToMod(Definition)Metadata

Copy link
Contributor Author

Choose a reason for hiding this comment

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

are we also referring to Packages as ModDefinitions

Packages is anything in the registry (could be a mod definition, brick definition, integration definition)

Comment on lines 252 to 256
// XXX: this may be not a reliable way to determine if the annotation
// is owned by the block or its sub pipeline.
// is owned by the brick or its sub pipeline.
// It assumes that it's only the pipeline field that can have a ".__value__" followed by "." in the path,
// and a pipeline field always has this pattern in its path.
return !restPath.includes(".__value__.");
Copy link
Collaborator

Choose a reason for hiding this comment

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

side note: I hate this 🤢

src/pageEditor/utils.ts Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jul 5, 2024

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@twschiller twschiller enabled auto-merge (squash) July 5, 2024 15:00
@twschiller twschiller added this to the 2.0.5 milestone Jul 5, 2024
@twschiller twschiller merged commit 63ee7cf into main Jul 5, 2024
18 checks passed
@twschiller twschiller deleted the feature/dev-ex-util-method-names branch July 5, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants