RunestoneInteractive / rs

A New Monorepo structure for Runestone
Other
41 stars 68 forks source link

Python activecodes buttons on assignment and preview run off screen #326

Open bhoffman0 opened 1 year ago

bhoffman0 commented 1 year ago

@bnmnetp In the python books, in the assignment pages and in the preview for assignment problems, the active code buttons run off the page.

image

But they are fine if you make the page smaller, so I think it might be the wrapper div rather than the ac-actions class styling that is the problem. They're also fine in the book pages in context because the width is narrower. They are also fine in Java books because there are more buttons.

bnmnetp commented 1 year ago

@bhoffman0 This weekend, I am releasing the assignment pages that use the new assignment server. Its a direct port from web2py to FastAPI, but.... The assignment pages are using a much newer version of bootstrap. I cannot reproduce this problem on on that new server.

The URLs from the old web2py pages automatically redirect to the new page. But I'm not deleting any of the old code in case something terrible happens and we have to backtrack. I really don't think that will be the case.

Finally, I could swear this is a problem that @gigamonkey fixed already some weeks ago...

So, I'm not going to chase this, unless it re-occurs on the new server.

cigas commented 1 year ago

I did not have this problem last Wednesday (8/16/2023) when my students did their assignments, but I do have it on ALL the author created exercises today (8/21/2023) including the ones the students did last week.

Runestone-Bad-Exercise-Display

If it helps, I edited and resaved one exercise and that fixed the problem. Runestone-Edited-exercises

bnmnetp commented 1 year ago

It seems to be the .col-md-12 class on the div that contanis the question.

It only happens at a certain width... On the assignment page if I make my browser a little narrower the problem goes away. So that is a short term workaround.

I would hate to make everyone go edit/rebuild all of the activecode questions that have this problem. Possible solutions:

  1. @gigamonkey has any ideas how this might be made to work. with just a CSS change? I don't understand flex well enough to make a guess.
  2. I could do a database update to remove the col-md-12 class from the source in the db that holds these questions. Note the questions @cigas rebuilt do not have that class anymore.
bnmnetp commented 1 year ago

I think the easiest solution is for me to run an update. I've got a sql update statement that will just remove the col-md-12 when it comes after the .ac_question which seems to be the most reliable fix.

bnmnetp commented 1 year ago

OK, I've done the update and things look good for me on questions that were bad before.

cigas commented 1 year ago

Looks good from my end too. I checked several more of my exercises and all seem OK.

cigas commented 1 year ago

It's baaaaaack! In Chrome, the buttons are not appearing in the correct place unless I enlarge the text so much that the code window appears below the rest of the text on the page. But it seems to be OK in Firefox. See images Chrome: Grading-Chrome Firefox: Grading-Firefox

bnmnetp commented 1 year ago

@cigas

I see that the col-md-12 class has returned in the database... Did you recently add or rebuild this question? I don't see it in activecode source anywhere so I'm not sure where it is coming from.

I've not updated anything in weeks as I've been travelling.

cigas commented 1 year ago

This is an old question that I reuse every term. I didn't edit it this term. I do copy assignments from previous terms, but that shouldn't matter as they are the same questions (mostly).

bnmnetp commented 1 year ago

OK, I think I understand a couple more things today than I did a few days ago.

  1. The runestone service (assignment builder) is running a version of runestone components that still adds the col-md-12 class... This requires some updating and testing of that service that I can't do while traveling.
  2. I never updated this question because it is an actex instead of an activecode I completely forgot about actex. I've updated so hopefully that fixes the problem for you.
  3. Building new questions or rebuilding old questions will bring back that col-md-12 class until I get everything updated. Not the end of the world, and can be fixed by rerunning my query.
  4. Do not mess with things while on vacation and have questionable internet service. 😬
  5. I'm still learning things about my build process for multiple docker containers.