Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@flacoman91
Copy link
Contributor

@flacoman91 flacoman91 commented Oct 19, 2022

Additions

  • adding useEvent hook to tie in any window event listeners

Removals

  • remove old componentWillMount code, etc

Changes

components modified:

  • PrintInfo
  • PrintInfoFooter
  • ResultsPanel
  • convert WindowSize to hook
  • fixed bugs with print line, area charts and tile map
  • hide tour when in print mode

Testing

Screenshots

Notes

In development, it will crash if you click the print link in the actionBar. Production currently seems okay.

Looks like its an existing bug when opening the print dialog. Upgrading to react 18 will fix the print crash.
facebook/react#16734

Todos

Checklist

  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the front end playbook
  • Passes all existing automated tests
  • New functions include new tests
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged
  • Visually tested in supported browsers and devices
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)

@flacoman91 flacoman91 force-pushed the print-info-functional branch 2 times, most recently from 5b1aa06 to f2cb8a3 Compare October 20, 2022 19:17
@flacoman91 flacoman91 changed the title hide tour button in print view, convert print header to functional Print Info to functional component, print mode bug fixes Oct 20, 2022
@flacoman91 flacoman91 marked this pull request as ready for review October 20, 2022 22:18
* @param {Function} handler - function to run
* @param {boolean} passive - if true, means function will never call preventDefault
*/
export function useEvent(event, handler, passive = false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This a cool hook!

Copy link
Contributor

@KatherynRizek KatherynRizek left a comment

Choose a reason for hiding this comment

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

Everything seems to work. The useEvent hook is a nice addition 👍

adding printinfo test

updating print handler

save work

remove passive

fixing unit tests

clean up snap

revert react changes

fixes to print mode

fixing busted tests

better comments

fixing broken cypress tests

lint

update the wait

change timeout
@flacoman91 flacoman91 force-pushed the print-info-functional branch from 6de74f7 to e91f43d Compare October 21, 2022 15:31
@flacoman91 flacoman91 merged commit d2df896 into main Oct 21, 2022
@flacoman91 flacoman91 deleted the print-info-functional branch October 21, 2022 15:45
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.

3 participants