-
Notifications
You must be signed in to change notification settings - Fork 0
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
Initial pass at printable report #89
Conversation
import { criteria } from "../../lists"; | ||
</script> | ||
|
||
<div class="govuk-width-container"> |
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.
|
||
<div class="govuk-width-container"> | ||
<table> | ||
<caption class="govuk-table__caption govuk-table__caption--m"> |
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.
Looks like all of this is exactly the same as the other report page. If so, a component to share between the two would be nice. The purpose of the new page is then just to discard some of the nav elements by using only the root layout
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 intended to do this, and just before opening your review remembered I didn't get around to it 🙈. On it
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.
Probably worth fixing and merging the other PR first, since there's changes there
import { base } from "$app/paths"; | ||
|
||
function openReportInNewTab() { | ||
window.open(`${base}/planning/report/printable`, '_blank').focus(); |
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'd remove the .focus()
. There's a TS error here, because open can fail. I think ?.focus()
would fix it. But I tried without focus at all, and there's browser-dependant behavior to autofocus or not. In Firefox by default, it's a new tab that autofocuses. I expect that's probably fine for most users.
Reorder and reword PR requests, needs rebasing when other PR is done
Reorder and reword PR requests, needs rebasing when other PR is done Npm run fmt and check Initial pass at printable report Reorder and reword PR requests, needs rebasing when other PR is done Npm run fmt and check
ac3ccbc
to
9495b18
Compare
Think this is sorted, seems to be working locally, formatted and checked |
Happy to merge this one? |
I think the wording will consideration, and we will want to share the layout more intelligently between the report page and the printable report page, but this is is okay proof of concept to show Will & Jadene