-
Notifications
You must be signed in to change notification settings - Fork 13
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
Remove redundant schema file, Remove exclusive editor prop from schema #532
base: main
Are you sure you want to change the base?
Conversation
Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/storylines-editor/issue-491 |
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.
Reviewed 3 of 9 files at r1, all commit messages.
Reviewable status: 3 of 9 files reviewed, 2 unresolved discussions
public/StorylinesSlideSchema.json
line 414 at r1 (raw file):
"description": "A caption to display below the slideshow." }, "userCreated": {
This looks like another temporary schema property exclusive to RESPECT that should be discarded upon saving
public/StorylinesSlideSchema.json
line 516 at r1 (raw file):
"default": true }, "rightOnly": {
Same with "rightOnly", "centerSlide", "centerPanel" which are only used in slide editor formatting
b3699aa
to
4d0a272
Compare
4d0a272
to
689ee76
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.
Reviewable status: 1 of 13 files reviewed, 3 unresolved discussions (waiting on @yileifeng)
public/StorylinesSlideSchema.json
line 414 at r1 (raw file):
Previously, yileifeng (Yi Lei Feng) wrote…
This looks like another temporary schema property exclusive to RESPECT that should be discarded upon saving
Donethanks
public/StorylinesSlideSchema.json
line 516 at r1 (raw file):
Previously, yileifeng (Yi Lei Feng) wrote…
Same with "rightOnly", "centerSlide", "centerPanel" which are only used in slide editor formatting
Donethanks
a discussion (no related file):
Now that the centerPanel
and centerSlide
properties are not added to panels, the centerPanel
and centerSlide
props, within the slide-editor
, are set by checking the customStyles
prop of the panel
- If both panels have
text-align: center;
set, thencenterPanel
is set to true, otherwise false - If left panel has
text-align: right;
set and right panel hastext-align: left
set , thencenterSlide
is set to true, otherwise false
However, when there is a fullscreen panel, both the center slide content
control and the center panel control
perform the exact same action, which is to set text-align: center;
on the individual panel
- Within
onSlideChanges()
there is no way to distinguish between whether the fullscreen panel has had thecenter slide content
control enabled or thecenter panel content
control enabled - So, I decided to disable the
center slide content
control when there is a fullscreen panel, and to setcenterPanel
to true when the individual panel hastext-align: center;
set
Let me know your thoughts on this design decision, and if you have any suggestions.
The main issue I have with this is that if the user enables the center slide content
control, and then enables the fullscreen panel
control, and then disables the fullscreen panel
control, the center panel content
control would be enabled, as opposed to the center slide content
control. If the user wants the center slide content
control to be enabled the entire time, they would have to manually set it again.
Related Item(s)
#491
Changes
StorylinesSchema.json
file, since it was not being used anywhere elseslide-editor
component from adding the following props to a panelmodified
rightOnly
centerPanel
centerSlide
image-editor
component from adding theid
prop to ImagePanel's within a slideshowuserCreated
from the schemasaveChanges()
before executing main logic ofpanelModified()
method, so that unsaved changes are captured and used when comparing the provided panel with its corresponding default configpublic
folder (was getting errors when testing)Note
centerPanel
andcenterSlide
properties are not added to panels, thecenterPanel
andcenterSlide
props, within theslide-editor
, are set by checking thecustomStyles
prop of the paneltext-align: center;
set, thencenterPanel
is set to true, otherwise falsetext-align: right;
set and right panel hastext-align: left
set , thencenterSlide
is set to true, otherwise falsecenter slide content
control and thecenter panel control
perform the exact same action, which is to settext-align: center;
on the individual panelonSlideChanges()
it is impossible to distinguish between whether the fullscreen panel has had thecenter slide content
control enabled or thecenter panel content
control enabledcenter slide content
control when there is a fullscreen panel, and to setcenterPanel
to true when the individual panel hastext-align: center;
settimeSlider
prop exists in the editors schema but not in the storylines schema. However it seems like thetimeSlider
prop is used within storylines. Should this be added to the storylines schema, or removed from the editor schema?Testing
Steps:
id
prop was not added to any of the image panelsThis change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)