-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
🎉 Native gdocs tables #2827
🎉 Native gdocs tables #2827
Conversation
Hey @ikesau, can you add a test article onto the staging server for this for quicker QA? |
I added the env vars for gdocs to the staging server http://staging-site-gdocs-table/admin |
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.
The code and structure look good. When using it I found that any kind of archieml component breaks because apparently the properties are not preserved. Arguably we don't want too many kinds of blocks to appear there anyhow but I think the parsing issue should be resolved.
Of the block content types that we do support, I think lists are pretty likely to be legit and probably images as well. Using gdoc bullet points broke the rendering of the page.
I think once these issues are resolved it should be good to ship from my side.
Lists broke? They shouldn't! I'll do some more testing Thanks 🙂 |
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.
hello! thanks a lot for recording those videos. I had several aha moments watching it - I worked with gdocs a little bit to make narrative charts work, so I had some understanding of it, but you just really helped me to connect those dots :)
btw, I really appreciate how the types flow through the pipeline. I remember that to be incredibly helpful when I looked into narrative charts!
I focused on the low level stuff, and there is not much from my side:
- tables don't seem to take up the full width for me (see screenshot below)
- the scope attribute on
th
elements should be the other way around, no?
children: React.ReactNode | ||
}) { | ||
const { tag, scope, children } = props | ||
return React.createElement(tag, { scope }, children) |
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 recently learned that, if you have a custom Tag
(must be uppercase), you can also just do <Tag />
which surprised me a bit, but it is possible. obvs no need to change, just a little fun fact :)
Thank you @sophiamersmann I hadn't pushed up the min-width changes on this remote 🤦 Definitely had the scopes the wrong way around. Need to be more vigilant to stop automation blindness with copilot. 😱 @danyx23 the table issue should be fixed now. Usually i.e. we were effectively getting this:
(A missing And now we properly get
|
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.
Adds support for tables in our articles via the Gdoc table element.
The
template
property determines which rows/columns get highlighted in the table. Its possible values are:header-column
,header-row
, andheader-column-row
.This is the Gdoc content for the first table in the preview:
The inline table gets parsed and converted into an Archie representation:
And this then gets parsed as a regular archie component in our
rawToEnriched
pipeline.Known remaining work: