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

Remove bibliotron-article #626

Merged
merged 7 commits into from
Jul 31, 2023
Merged

Conversation

nedredmond
Copy link
Contributor

@nedredmond nedredmond commented Jul 25, 2023

Removes bibliotron-article class, which also fixes line number alignment issue on article passages

LC-1082 (subtask of LC-596)
LC-1072

@changeset-bot
Copy link

changeset-bot bot commented Jul 25, 2023

🦋 Changeset detected

Latest commit: 61851d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@khanacademy/perseus Minor
@khanacademy/perseus-editor Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@khan-actions-bot khan-actions-bot requested a review from a team July 25, 2023 18:37
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Jul 25, 2023

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/perfect-windows-listen.md, packages/perseus/src/article-renderer.tsx, packages/perseus/src/__stories__/article-renderer.stories.tsx, packages/perseus/src/__testdata__/article-renderer.testdata.ts, packages/perseus/src/styles/articles.less, packages/perseus/src/widgets/passage.tsx, packages/perseus-editor/src/styles/perseus-editor.less, packages/perseus/src/styles/widgets/passage.less, packages/perseus/src/widgets/__tests__/__snapshots__/passage-ref.test.ts.snap, packages/perseus/src/widgets/__tests__/__snapshots__/passage.test.tsx.snap

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 25, 2023

Size Change: -120 B (0%)

Total Size: 825 kB

Filename Size Change
packages/perseus/dist/es/index.js 397 kB -120 B (0%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38 kB
packages/kmath/dist/es/index.js 4.13 kB
packages/math-input/dist/es/index.js 79.5 kB
packages/perseus-core/dist/es/index.js 55 B
packages/perseus-editor/dist/es/index.js 268 kB
packages/perseus-error/dist/es/index.js 705 B
packages/perseus-linter/dist/es/index.js 21.2 kB
packages/pure-markdown/dist/es/index.js 3.65 kB
packages/simple-markdown/dist/es/index.js 12.6 kB

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Jul 25, 2023

npm Snapshot: Published

🎉 Good news!! We've packaged up the latest commit from this PR (c9ae161) and published it to npm. You
can install it using the tag PR626.

Example:

yarn add @khanacademy/perseus@PR626

@coveralls
Copy link
Collaborator

coveralls commented Jul 25, 2023

Coverage Status

coverage: 68.988% (-0.03%) from 69.017% when pulling 61851d0 on ned/LC-1082-rm-bibliotron-article into a0c7156 on main.

Copy link
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

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

Niiiice.. Glad we're starting down this road.

@@ -469,15 +469,6 @@
text-align: center;
}

.bibliotron-article.framework-perseus.perseus-article {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given this touches the perseus editor less file, we'll want to double-check how the article editor looks on a ZND

@@ -34,6 +34,9 @@ class ArticleRenderer extends React.Component<any, any> {
]).isRequired,

// Whether to use the new Bibliotron styles for articles
/**
* @deprecated Does nothing
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to cut this out entirely? Or does that cause too much churn?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeremywiebe I am just not familiar enough with Perseus to know how to remove this without causing errors to throw. I assumed it would be called by the consumer somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I figured that would be a breaking change to the external API. Please let me know if I'm mistaklen.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be. But if we're doing this work, it'd be good to clean up this (now dead) flag. In webapp and mobile, we always set the value to true so it'd just be a matter of deleting those props.

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok-- well, we'd have to do that in a follow-up task, and we can't remove it here until it's been removed from those two places, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or I guess it could be part of a deploy but that's leaving it down to whomever cuts the next release to know to do that or break articles everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think making tasks to clean it up for webapp and mobile first, which blocks the task to remove it here, would be a better move than just doing it now, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd rather it all happen at once. We have a history of making cleanup tasks and leaving them undone. If you land this change, you can also cut a Perseus release and then follow up by updating webapp with the new version and the accompanying changes. I'm ok if Mobile is left for now as it's a super tiny change and will be very easy to adjust when we upgrade Perseus there.

@@ -87,12 +45,13 @@
.body-text;
margin: 0 auto;
max-width: @articleMaxWidth;
}
.perseus-renderer > .paragraph .paragraph {
Copy link
Collaborator

Choose a reason for hiding this comment

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

So we don't need to specify only .paragraph's inside .perseus-renderer's anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2023-07-27 at 11 23 09 AM

Comment on lines -516 to +515
<div id={"perseus-widget-passage-container" + joinedTitle}>
<div className="perseus-widget-passage-container">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sweet! Glad we could revert back to using class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, probably less churn on the browser

@nedredmond nedredmond force-pushed the ned/LC-1082-rm-bibliotron-article branch from 74fea6b to 61851d0 Compare July 27, 2023 15:53
@nedredmond nedredmond merged commit 2fb66a9 into main Jul 31, 2023
9 checks passed
@nedredmond nedredmond deleted the ned/LC-1082-rm-bibliotron-article branch July 31, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants