-
Notifications
You must be signed in to change notification settings - Fork 388
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
Add configuration to create and use global block on a namespace #1727
base: 2024.9.x
Are you sure you want to change the base?
Conversation
4fc9322
to
decffff
Compare
e1eb578
to
edd2604
Compare
edd2604
to
f3d4d96
Compare
client/web/compose/src/components/Admin/Page/Builder/Selector.vue
Outdated
Show resolved
Hide resolved
client/web/compose/src/components/Admin/Page/Builder/Selector.vue
Outdated
Show resolved
Hide resolved
client/web/compose/src/components/Admin/Page/Builder/Selector.vue
Outdated
Show resolved
Hide resolved
client/web/compose/src/components/Admin/Page/Builder/Selector.vue
Outdated
Show resolved
Hide resolved
client/web/compose/src/components/Admin/Page/Builder/Selector.vue
Outdated
Show resolved
Hide resolved
baae52b
to
4ec6a59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to this; what happens if we change the block definition (the name/id for example), delete it, etc? How do we assure references are ok and we don't just end up with broken pages?
125e8c4
to
6198193
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A consideration, else looks good to me 👍 ; wp
GlobalBlock struct { | ||
BlockID uint64 `json:"blockID,string,omitempty"` | ||
|
||
Options map[string]interface{} `json:"options,omitempty"` | ||
Style PageBlockStyle `json:"style,omitempty"` | ||
Kind string `json:"kind"` | ||
XYWH [4]int `json:"xywh"` // x,y,w,h | ||
Meta map[string]any `json:"meta,omitempty"` | ||
|
||
// Warning: value of this field is now handled via resource-translation facility | ||
// struct field is kept for the convenience for now since it allows us | ||
// easy encoding/decoding of the outgoing/incoming values | ||
Title string `json:"title,omitempty"` | ||
|
||
// Warning: value of this field is now handled via resource-translation facility | ||
// struct field is kept for the convenience for now since it allows us | ||
// easy encoding/decoding of the outgoing/incoming values | ||
Description string `json:"description,omitempty"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine but you could consider just doing this:
GlobalBlock struct {
PageBlock
}
Since you're basically doing a full blown copy of the page block this would be fine.
For page layouts, I preserve just the reference and coordinates and size since that's all that we care about there.
64d5780
to
7bc30f3
Compare
fce0ad6
to
57e6a7f
Compare
d2fcfdf
to
bf68606
Compare
d04c433
to
4b18cc5
Compare
Stale pull request message |
d5eef63
to
a48155e
Compare
16027e5
to
63a0a66
Compare
b17424e
to
7b09018
Compare
5b052f0
to
dd50534
Compare
94f78e4
to
628d0da
Compare
The following changes are implemented
TODO: Summary
Changes in the user interface:
TODO: Add screenshots, recordings or remove this section
Checklist when submitting a final (!draft) PR