Skip to content

Conversation

@nole2701
Copy link
Collaborator

Issue list is in this spreadsheet
https://docs.google.com/spreadsheets/d/1mxTOXmBQQTaa4usXe2uaPrO0-COXD1Gc9EcekPqwNqI/edit?gid=0#gid=0

Main Problems

  • Text flowing beside headers creating narrow, unreadable columns
  • Images causing horizontal overflow and appearing blurry
  • Tables extending beyond screen width
  • Videos misaligned with overlapping elements
  • Form inputs in exercises overflowing off-screen

Solution

  • Added wordpressContentFix class applied conditionally upon !isDesktop detection
  • Used globalStyle to target children elements within the WordpressPage using responsive sizing, as well as clear and float to stack content more vertically rather than horizontally
  • added image and video handling to const parseOptions in wordpress.tsx to improve readability with -webkit-optimize-contrast, click to enlarge images in case it's a really big table that you can't read properly, and responsive sizing on all platforms

Problems/Limitations

  • Added an exception for 5+ column tables to allow them to overflow horizontally. It's not possible to squish them while keeping them readable so this is a compromise. I decided on 5+ columns from just looking around those pages and seeing what might and might not need it. A better fix would likely be in the Wordpress page design by perhaps rotating table elements, eg. 2x6 -> 6x2
  • For the orange ticket issues, the redirect for all of them on the prev/next module buttons is either to a dev.dailp.northeastern.edu/lessons/(page name) or a wordpress link like https://https//wp.dailp.northeastern.edu/lessons/(page name). I don't think the fix is in the codebase but rather in the Wordpress, just changing the redirects to /collections/cwkw/(page name) instead.

@netlify
Copy link

netlify bot commented Sep 23, 2025

Deploy Preview for dailp ready!

Name Link
🔨 Latest commit 3b6bec5
🔍 Latest deploy log https://app.netlify.com/projects/dailp/deploys/68e699945803cd000808ee8b
😎 Deploy Preview https://deploy-preview-499--dailp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@GracefulLemming GracefulLemming left a comment

Choose a reason for hiding this comment

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

Ive left a few notes on code practices. I also took a look at the preview briefly but Ive asked Jae to take a deeper look. Once they review the preview, I can approve

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way you could deduplicate some of the styling in this file?

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 removed some stylings that are handled at the container level like for tables, but I left the width and maxwidth styles to maintain the sizing more explicitly incase on wordpress it might send in something different.

Copy link
Collaborator

@alisony755 alisony755 left a comment

Choose a reason for hiding this comment

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

Great work overall! I just left a few comments about maintainability and edge cases.

onClick={(e) => {
// Open image in new tab for full view
window.open(e.currentTarget.src, "_blank")
}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I really like the click-to-enlarge feature for images! We could also consider adding an accessibility note (like alt text or a tooltip) so users know the image can be enlarged?

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 just added a title tag saying "click to view full size". I thought about adding a caption that only shows on mobile but I don't think that's possible from the code end because the page comes from wordpress.

width: "auto",
minWidth: "0px",
maxWidth: "200px",
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could change the fixed maxWidth to a variable or theme token so it’s easier to tweak later

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 changed this to half the width of the screen.

style={{
width: "100%",
maxWidth: "100%",
height: "auto",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm noticing that some styles are inline (like for <video> here) while others are in globalStyle. Would it make sense to consolidate for consistency and maintainability?

Copy link
Collaborator Author

@nole2701 nole2701 Sep 26, 2025

Choose a reason for hiding this comment

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

I moved these into document.css.ts which is where the css for the wordpress.tsx file comes from. globalStyle isn't needed here because it's applied directly to the target element. globalStyle is useful because it allows you to target child elements you don't have direct access to.

width: "auto !important", // Override inline width="300"
height: "auto !important", // Override inline height="300"
minWidth: "120px !important",
display: "inline-block !important",
Copy link
Collaborator

Choose a reason for hiding this comment

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

The 120px minWidth could cause layout issues on small screens. Have we tested this on smaller devices?

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 changed this to quarter width of the screens so that it stays more consistent. Though if an image really is too small for a particular device then it probably makes sense for the user to click to enlarge anyways.

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