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
[Migration] Create blocks table for storing shared blocks #22418
Conversation
dashboard/app/models/block.rb
Outdated
serialized_attrs %{ | ||
config | ||
helperCode | ||
} |
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.
what's the thinking behind making these properties and not columns?
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.
That's an excellent question, they're probably better off as columns.
Interesting! There was a previous "blocks" table at one point: https://github.com/code-dot-org/dashboard/commit/351199df7347f8f533c498bbde93611f73865422#diff-79e814ed2f56d19968709aab58c988da |
0f0ced6
to
e1e4c24
Compare
@Hamms PTAL |
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.
One question, but generally LGTM!
# level_type :string(255) | ||
# category :text(65535) | ||
# config :text(65535) | ||
# helper_code :text(65535) |
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.
what's helper_code
?
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.
It's extra javascript to be added to the helper library to support this block. E.g. if you add a block for setTint(color)
, this would be the definition of that function.
Mini dev doc for the block pool: https://docs.google.com/document/d/1H4IS3g8iS3yxACriRfK1QWrx7CT4C6jhWZY-aCUMGK0/edit#