-
Notifications
You must be signed in to change notification settings - Fork 7
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: increase recommended logo size, improve javascript, replace Twitter logo #474
Conversation
…uTube, and Bluesky
…e SVG for YouTube icon, remove unneeded assets
$anchorElement.scrollTo({ duration: 1500 }); | ||
$anchorElement.trigger('focus'); | ||
} else { | ||
console.warn(`Anchor element "${anchorUponArrival}" not found in the document.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can delete this console.warn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could fail, silently, sure. I was adding it in case someone wanted to understand why the page didn't jump to the expected anchor point. Previously we were just throwing an error if the anchor wasn't present: #235. Happy to defer to your judgment about what's best
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it. I think it would be good to debug, maybe locally or on dev, but I am not sure if we want to print errors in the console in production for debugging purposes. In case we want to debug it in prod, maybe we could think of some strategy, such as sending it somewhere in the backend and putting it in the error logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't intending it to be used for debugging by a developer, but to inform the browser user. If, for example, as a reader I pasted a link that looks like this: https://pressbooks.pub/mybook/#fake
but the fake anchor doesn't exist in the page, I might be surprised that the page doesn't load at the expected anchor. Opening the browser console would display a warning message telling me that the anchor fake
doesn't exist on the page so I could correct or update the URL path. It was purely intended for informational purposes. If you don't think it's helpful, let me know, and I can remove it -- it would be a simple commit to take it out.
input.classList.add('error'); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a linting issue here it seems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: new Aetna release has been made and bump was added to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM I tested all of this changes and works as expected
This PR increases the recommended custom logo size (from 40x265 pixels to 140x560 pixels) in order to support the display of logos up to 70x280 pixels on Retina 2x monitors. Fixes #201. Note: will need to wait to be merged until new release of Aetna is updated in this repo. See pressbooks/aetna#87
It addresses #198 by adding a new 'Header Background' option to the color customizer. Depends on pressbooks/pressbooks#3867 and the open PR in Aetna.
It resolves #235 by making small improvements to the common.js javascript file.
It also replaces the Twitter logo (and label) with X's logo and label, replaces the link to the no longer maintained Pressbooks Twitter account in the footer with a link to our LinkedIn page, and adds three new social media options to the Customizer (for LinkedIn, YouTube, and Bluesky).