Skip to content
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

fix(magic-block-parser): handle excess table data #78

Merged
merged 7 commits into from
Nov 30, 2020

Conversation

kellyjosephprice
Copy link
Collaborator

🧰 Changes

The old magic block syntax allowed shrinking the dimensions of a table,
and would leave the data in place. Unknown if that's a bug or a feature.
In any event, the new engine should needs to handle that.

The old magic block syntax allowed shrinking the dimensions of a table,
and would leave the data in place. Unknown if that's a bug or a feature.
In any event, the new engine should needs to handle that.
@kellyjosephprice kellyjosephprice requested review from a team, domharrington and emilyskuo and removed request for a team November 18, 2020 21:27
Copy link
Contributor

@rafegoldberg rafegoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are blowing my mind. Made some minor comments/suggestions below. Will re-review after I've checked this out locally!

__tests__/components.test.js Outdated Show resolved Hide resolved
processor/parse/magic-block-parser.js Outdated Show resolved Hide resolved
};

module.exports.silenceConsole = fn => {
const potentialSpies = new Proxy({}, consoleStubHandler);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I regret trying to be cute here. I realized you can't use this and not write an expectation, since you have to call the dynamic getter.

const wrap = mount(markdown.react(fx));
return expect(wrap.html()).toMatchSnapshot();

silenceConsole()(error => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to quieten the console.logs during testing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there's a caught error that prints to error

__tests__/magic-block-parser/table.test.js Show resolved Hide resolved
@kellyjosephprice kellyjosephprice added the bug Something isn't working label Nov 25, 2020
@kellyjosephprice kellyjosephprice merged commit 33bab04 into next Nov 30, 2020
@kellyjosephprice kellyjosephprice deleted the fix/old-table-rows branch November 30, 2020 19:54
rafegoldberg pushed a commit that referenced this pull request Dec 1, 2020
## Version 6.23.0

### ✨ New & Improved

* treat react and react-dom as external deps ([#90](#90)) ([7be16d7](7be16d7))

### 🛠 Fixes & Updates

* **magic-block-parser:** handle excess table data ([#78](#78)) ([33bab04](33bab04))

<!--SKIP CI-->
@rafegoldberg
Copy link
Contributor

This PR was released!

🚀 Changes included in v6.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants