Skip to content

Update the mqeditor to use MathQuill's new internal toolbar.#1417

Open
drgrice1 wants to merge 1 commit into
openwebwork:PG-2.21from
drgrice1:mathquill-internal-toolbar
Open

Update the mqeditor to use MathQuill's new internal toolbar.#1417
drgrice1 wants to merge 1 commit into
openwebwork:PG-2.21from
drgrice1:mathquill-internal-toolbar

Conversation

@drgrice1
Copy link
Copy Markdown
Member

@drgrice1 drgrice1 commented May 23, 2026

These are changes needed to use the new internal toolbar implemented in openwebwork/mathquill#46. To test this you need to use that branch. Clone that branch somewhere on the webwork2 server, and then in the directory of that clone execute

npm ci
npm run build
npm link

Then checkout the branch for this pull request in the /opt/webwork/pg directory (or wherever you have the PG repository). Make sure you run npm ci in the pg/htdocs directory before doing the following so that the JavaScript and css for PG is all updated.

Then in the pg/htdocs directory run npm link @openwebwork/mathquill. After doing so if you look at pg/htdocs/node_modules/@openwebwork/mathquill you will see that it is now a link to the MathQuill clone above.

Now restart the webwork2 app.

One last important step. Since the package.json file is not changed (so the version of @openwebwork/mathquill is still reported as the same), the browser may still load the cached version of MathQuill. So you may need to do a hard refresh in the browser to get it to load the updated MathQuill javascript.

When you are done testing this branch, execute npm ci again to remove the symbolic link and go back to using the currently published MathQuill version.

Once openwebwork/mathquill#46 is merged, I will publish the changes in openwebwork/mathquill#46 and add it to this pull request. So don't merge this pull request until then.

@Alex-Jordan
Copy link
Copy Markdown
Contributor

I'm unsure that I am testing this correctly. I cloned the mathquill repo at /opt/webwork/mathquill and then I executed the commands above in that repo.

Then I checked out this branch of pg and in pg/htdocs I ran npm link @openwebwork/mathquill. I restarted webwork2. In a problem, I don't see changes with the toolbar. I understand they would largely be invisible to me. But for instance the "Disable Toolbar" whitespace issue from #1415 is still showing for me, so I think something I am doing is wrong.

These are changes needed to use the new internal toolbar implemented in
openwebwork/mathquill#46.  To test this you need
to use that branch. Clone that branch somewhere on the webwork2 server,
and then in the directory of that clone execute

```bash
npm ci
npm run build
npm link
```

Then in the `pg/htdocs` directory run `npm link @openwebwork/mathquill`.
After doing so if you look at `pg/htdocs/node_modules/@openwebwork/mathquill`
you will see that it is now a link to the MathQuill clone above.

Execute `npm ci` again to reset that back to the currently published
MathQuill version.

Once openwebwork/mathquill#46 is merged, I will
publish it and add it to this pull request.  So don't merge this pull
request until then.
@drgrice1 drgrice1 force-pushed the mathquill-internal-toolbar branch from 9cafe67 to 45bdd18 Compare May 24, 2026 10:41
@drgrice1
Copy link
Copy Markdown
Member Author

I changed the testing instructions a bit. There were some steps I missed that might be why you weren't seeing the changes in effect.

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.

2 participants