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
TypeScript: pageCanvas
provider
#12891
Conversation
|
||
export default createContext({ actions: {}, state: {} }); | ||
import type { Element } from '@googleforcreators/elements'; |
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.
Added a declaration file for DisplayElement
, otherwise converting the provider is blocked.
...breakpoint, | ||
raw, | ||
}, | ||
}; |
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.
Converted the theme part to TypeScript since it seems to be constants only.
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.
Thanks git for thinking this is the same file before and after 🙄
packages/story-editor/src/app/pageCanvas/utils/storyPageToNode.tsx
Outdated
Show resolved
Hide resolved
Plugin builds for 496aaff are ready 🛎️!
|
Size Change: +3.63 kB (0%) Total Size: 2.71 MB
ℹ️ View Unchanged
|
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.
Looks good 🐅
...breakpoint, | ||
raw, | ||
}, | ||
}; |
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.
Thanks git for thinking this is the same file before and after 🙄
packages/story-editor/src/app/pageCanvas/getPageWithoutSelection.ts
Outdated
Show resolved
Hide resolved
height: 100%; | ||
position: relative; | ||
overflow: hidden; | ||
background-color: ${({ theme }) => theme.colors.fg.white}; | ||
background-color: ${({ theme }) => (theme as typeof ds_theme).colors.standard.white}; |
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.
Hmm, is that necessary? That should happen automatically if things are correctly set up.
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.
I didn't set anything up, I just converted the theme constant files into .ts files, nothing else :) Perhaps making sure it works without casting could be part of #12659?
packages/story-editor/src/components/canvas/displayElement.d.ts
Outdated
Show resolved
Hide resolved
The failing test fails on |
Context
Summary
Relevant Technical Choices
To-do
User-facing changes
Testing Instructions
This PR can be tested by following these steps:
Reviews
Does this PR have a security-related impact?
Does this PR change what data or activity we track or use?
Does this PR have a legal-related impact?
Checklist
Type: XYZ
label to the PRFixes #12667