Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

feat(plugin): add layers.overriddenProperties, find, findAll, walk #110

Merged
merged 3 commits into from
Oct 25, 2021

Conversation

rot1024
Copy link
Member

@rot1024 rot1024 commented Oct 22, 2021

Add fields and functions to plugin layers API:

export type Layers = {
  readonly overriddenProperties?: { [id: string]: any };
  readonly find: (
    fn: (layer: Layer, index: number, parents: Layer[]) => boolean,
  ) => Layer | undefined;
  readonly findAll: (fn: (layer: Layer, index: number, parents: Layer[]) => boolean) => Layer[];
  readonly walk: <T>(
    fn: (layer: Layer, index: number, parents: Layer[]) => T | void,
  ) => T | undefined;
}

And also add type field (user-friendly representation of layer type) to layer

@netlify
Copy link

netlify bot commented Oct 22, 2021

✔️ Deploy Preview for reearth-web ready!

🔨 Explore the source changes: d32551a

🔍 Inspect the deploy log: https://app.netlify.com/sites/reearth-web/deploys/61766635cfacd50008909966

😎 Browse the preview: https://deploy-preview-110--reearth-web.netlify.app

@codecov
Copy link

codecov bot commented Oct 22, 2021

Codecov Report

Merging #110 (afeefee) into main (1e92b8e) will decrease coverage by 0.78%.
The diff coverage is 14.28%.

❗ Current head afeefee differs from pull request most recent head d32551a. Consider uploading reports for the commit d32551a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
- Coverage   53.41%   52.63%   -0.79%     
==========================================
  Files          48       48              
  Lines         893      912      +19     
  Branches      121      128       +7     
==========================================
+ Hits          477      480       +3     
- Misses        366      381      +15     
- Partials       50       51       +1     
Impacted Files Coverage Δ
...rc/components/molecules/Visualizer/Layers/store.ts 56.25% <14.28%> (-32.64%) ⬇️
src/theme/publishTheme/index.ts 20.00% <0.00%> (+2.35%) ⬆️

@rot1024 rot1024 changed the title feat(plugin): add layers.find, findAll, walk feat(plugin): add layers.overriddenProperties, find, findAll, walk Oct 22, 2021
Copy link
Member

@KaWaite KaWaite left a comment

Choose a reason for hiding this comment

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

LGTM

@rot1024 rot1024 merged commit ebe1314 into main Oct 25, 2021
@rot1024 rot1024 deleted the feat/new-plugin-layer-api branch October 25, 2021 08:09
keiya01 pushed a commit that referenced this pull request Apr 25, 2023
* improved infobox style

* fix mask id

* fix order

* update ja title

* set min/max for height and outlineWidth

* Update pkg/builtin/manifest_ja.yml

Co-authored-by: HideBa <49897538+HideBa@users.noreply.github.com>

* Update pkg/builtin/manifest_ja.yml

Co-authored-by: HideBa <49897538+HideBa@users.noreply.github.com>

* Update pkg/builtin/manifest_ja.yml

Co-authored-by: HideBa <49897538+HideBa@users.noreply.github.com>

* Update pkg/builtin/manifest_ja.yml

Co-authored-by: HideBa <49897538+HideBa@users.noreply.github.com>

* Update pkg/builtin/manifest_ja.yml

Co-authored-by: HideBa <49897538+HideBa@users.noreply.github.com>

Co-authored-by: HideBa <baba.papa1120.ba@gmail.com>
Co-authored-by: lavalse <lavalselike@gmail.com>
Co-authored-by: HideBa <49897538+HideBa@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants