Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

feat: widget align system #19

Merged
merged 99 commits into from Sep 24, 2021
Merged

feat: widget align system #19

merged 99 commits into from Sep 24, 2021

Conversation

KaWaite
Copy link
Member

@KaWaite KaWaite commented Jul 5, 2021

Overview

  • Add WidgetAlignSystem to backend to handle how the widgets will be placed in the Editor on the front-end.
  • Add WidgetLayout to Plugin's extensions to handle how the widget will be handled with the align system.
  • Includes migrations for both plugins(adding the WidgetLayout to all plugin's extensions) and scene (adding a widget align system to all already made scenes)

What I've done

  • Develop a widget align system to handle alignment of enabled widgets
  • Added WidgetLayout to Plugin/sceneWidget
  • Added WidgetAlignSystem to scene
  • DB migration for adding alignSystem to scenes

What I haven't done

How I tested

  • with graphql queries and mutations, in graphql playground, added, removed, updated widget align system
  • tested both migrations on local machine

Which point I want you to review particularly

  • Everything

Memo

KaWaite added 19 commits July 5, 2021 17:50
… function and remove function + testing for all so far
…ate types, update convert.go, update extension.go as well as its builder and tests
…hat aren't related to the align system.

fixed conversion logic for empty WidgetLayout
fixed conversion logic for empty DefaultLocation
Update plugin.WidgetLayout use and add WidgetLayout where necessary
Pull out widgetlayout and
conditionally add widget to widgetalignsystem in AddWidget
Add SetExtended method to Widget
Add extended to UpdateWidgetParam
Combine Move and Reorder methods + tests
Add WidgetIds and Alignment methods to alignSystem
Update graphql
Etc
Make widgetIds a slice of pointers to the ids
Update add test to include two additions
Update logic in scene interactor to be more deliberate
Update scene controller to avoid assignment if nil
Conversions for graphql and structs
Updated graphql schemas + gens
simplify conditionals/avoid lint warning
@codecov
Copy link

codecov bot commented Jul 29, 2021

Codecov Report

Merging #19 (f63fb9b) into main (33f4c7c) will decrease coverage by 0.05%.
The diff coverage is 52.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   16.57%   16.52%   -0.06%     
==========================================
  Files         241      246       +5     
  Lines       41399    42966    +1567     
==========================================
+ Hits         6862     7099     +237     
- Misses      33545    34862    +1317     
- Partials      992     1005      +13     
Impacted Files Coverage Δ
internal/adapter/gql/generated.go 0.00% <ø> (ø)
internal/adapter/gql/resolver_mutation_scene.go 0.00% <0.00%> (ø)
internal/infrastructure/mongo/mongodoc/plugin.go 0.00% <0.00%> (ø)
internal/infrastructure/mongo/mongodoc/scene.go 0.00% <0.00%> (ø)
...ernal/infrastructure/mongo/mongodoc/scene_align.go 0.00% <0.00%> (ø)
internal/usecase/interactor/scene.go 0.00% <0.00%> (ø)
pkg/scene/builder/encoder.go 92.85% <ø> (ø)
pkg/scene/widget.go 73.33% <33.33%> (-26.67%) ⬇️
pkg/plugin/extension.go 71.87% <60.86%> (-28.13%) ⬇️
pkg/scene/widget_align_system.go 79.59% <79.59%> (ø)
... and 15 more

KaWaite added 9 commits July 29, 2021 17:53
Add align to widget update
Add widgetLayout to reearth widgets
Fix/improve conditionals
Add extended bool to sceneWidget (graphql)
Move up updating align to top of if statements
Add Equal method to widgetId
Migration for adding alignSystem to scene
Remove commented out code in scene builder
@KaWaite KaWaite marked this pull request as ready for review July 31, 2021 03:45
KaWaite and others added 20 commits September 9, 2021 18:29
Fix nil pointer errors.
Co-authored-by: KaWaite <KaWaite@users.noreply.github.com>
Co-authored-by: KaWaite <KaWaite@users.noreply.github.com>
Co-authored-by: HideBa <HideBa@users.noreply.github.com>
Co-authored-by: KaWaite <KaWaite@users.noreply.github.com>
Co-authored-by: HideBa <HideBa@users.noreply.github.com>
pkg/builtin/manifest.yml Outdated Show resolved Hide resolved
rot1024
rot1024 previously approved these changes Sep 24, 2021
pkg/builtin/manifest.yml Outdated Show resolved Hide resolved
pkg/builtin/manifest_ja.yml Outdated Show resolved Hide resolved
pkg/builtin/manifest_ja.yml Outdated Show resolved Hide resolved
@KaWaite KaWaite merged commit 94611f9 into main Sep 24, 2021
@KaWaite KaWaite deleted the feat-align-system branch September 24, 2021 09:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants