Skip to content
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

task/WG-167: Overhaul questionnaire style #169

Conversation

taoteg
Copy link
Contributor

@taoteg taoteg commented Nov 22, 2023

Overview:

Overhaul the Questionnaire view style:

  • General alignment with hazmapper design
  • Wider panel size
  • Making the view more compact vertically
  • remove white space

PR Status:

  • Ready.
  • Work in Progress.
  • Hold.

Related Jira tickets:

Summary of Changes:

Culled the mass of styles in the sheet down to only those used in the viewer portion. Restyled the questionnaire to use simple, clean black & white text with indention and font-styling to indicate content role in the display design. Tried to match the design used by Hazmapper in general.

Testing Steps:

  1. Pull branch.
  2. Build project.
  3. Run project.
  4. View questionnaire.

Note: To test the p.rangeAnswer.selected style, open the browser dev tools, view the page Elements, drill down to and select one of the rangeAnswer elements (<p class="rangeAnswer">#</p> and add the selected style to it: <p class="rangeAnswer selected">#</p>

The UI will update to render a blue circle around the selected answer value.

UI Photos:

Updated images to reflect design as of commit 96efcd8

  • chrome_mZataColdy
  • chrome_8icb3O3qpA
  • chrome_WAssaqeN7g
  • chrome_su4o7nIogq
  • chrome_8PwILS6j1a

Notes:

When reviewing existing questionnaires try to find any edge cases I missed when testing the design overhaul.

…ize of the modal window to begin improving layout and styles.
…modal. Next is to prune out the margins and spacing. Need clean unstyled text in the UI to build new CSS back up on.
…nments from selectors in questionnaire modal.
…e viewer. Ready to rebuild the style back up now.
…rate with the Hazmapper design aesthetic. Still working on a few question types - ranged options specifically - but otherwise clean layout now.
… content indicates a selected state so I set a value anyway in case we update the view code to include that attribute.
@nathanfranklin nathanfranklin changed the title Task/from branch feature questionnaire task wg 167 style overhaul task/WG-167: Overhaul questionnaire style Nov 28, 2023
::ng-deep div.hidden {
display: none;
::ng-deep div.locationMapContainer,
::ng-deep img {
Copy link
Collaborator

Choose a reason for hiding this comment

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

all img's are getting the border (i.e in leaflet or on main page).

it looks like the following would fix it:

::ng-deep div.locationMapContainer,
::ng-deep app-modal-questionnaire-viewer > div.view-only-questionnaire-container > img {

but it also appears that dropping the ng-deep would fix it as well. not certain on that, as i understood that we needed the ng-deep everywhere:

::ng-deep div.locationMapContainer,
img {

Copy link
Collaborator

@nathanfranklin nathanfranklin Nov 28, 2023

Choose a reason for hiding this comment

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

but it also appears that dropping the ng-deep would fix it as well. not certain on that, as i understood that we needed the ng-deep everywhere:

ignore the dropping the ng-deep suggestion. seems like specificity is different than our regular angular components so ng-deep is probably needed in some places; so probably best to leave alone.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the ng-deep is needed to override those deeply nested elements in the questionnaire... its a bit wonky. Can't wait to convert this thing to a legit proper component with isolated styling control.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add the specificity to avoid adding borders to images in the other pages. Didn't mean to touch any design above the questionnaire level, but I did forget to test the unrelated parts of the app.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I better isolated the selectors to only effect the questionnaire viewer modal. Should be much better now.

Copy link
Collaborator

@nathanfranklin nathanfranklin left a comment

Choose a reason for hiding this comment

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

Besides the one comment. LGTM 👍 Great to have it looking nice!

Copy link
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

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

No sure if this is out of scope - but should there be a close button with an X icon at the top of the modal? And maybe the title of the questionnaire as it appears in the the asset detail panel?

Also, for text area type of fields, it allows you type into them as if you can edit. Is there a way to disable text area fields? Obviously it doesn't save as there is no submit/post but could be confusing from a user perspective.

Screen.Recording.2023-11-29.at.10.27.02.AM.mov

…le images embedded within the quesitonnaire modal. Added support for rangeSelect quesitons and for matrixTable question styling. Adjusted overall font sizes and layout for better legibility an duse of white-space.
…de locally. Investigating, but this commit is clean.
@taoteg
Copy link
Contributor Author

taoteg commented Nov 29, 2023

Great catch on those fields! I disabled interaction with any of the elements of the questionnaire view modal so no weird display tinkering will tempt users.

Going to punt on the close button for now (because that is a heavier lift and a UX behavior thing), but I do wonder what the latest accessibility practice related thinking on close buttons is... TICKET!

Copy link
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
Collaborator

@nathanfranklin nathanfranklin left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@taoteg taoteg merged commit de2ef42 into feature/questionnaire Nov 30, 2023
5 checks passed
@taoteg taoteg deleted the task/from-branch-feature-questionnaire-task-WG-167-style-overhaul branch November 30, 2023 17:47
nathanfranklin added a commit that referenced this pull request Dec 18, 2023
* task/WG-96 add assets to original questionnaire code (#144)

* Do not show _hazmapper properties

* Add ng-bootstrap to use carousel

* Add carasol to show questionnaire assets

* User correct version of npm so lock file doesn't change

* Switch CI to match our container's version of node

* Refactor into a component

* Remove bootstrap

* Use own-carousel for image asset carousel

* Fix linting

* Remove unintended blank line

* Revert "Switch CI to match our container's version of node"

This reverts commit 357027a.

* Fix weird formatting issues

* Revert "Revert "Switch CI to match our container's version of node""

This reverts commit 4077c5a.

* task/WG-173:show asset image alongside question in the questionnaire (#165)

* Show asset images with questions

* Fix prettier errors

* Remove reduntant types from JSDoc strings

* task/WG-167: Overhaul questionnaire style (#169)

* Initial commit to get the Questionnaire redesign rolling. Initial resize of the modal window to begin improving layout and styles.

* Added comment to evolving styles.

* Initial pass removing all font-sizes and color form the questionnaire modal. Next is to prune out the margins and spacing. Need clean, unstyled text in the UI to build new CSS back up on.

* Removed all font weighting, font type assignments and font size assignments from selectors in questionnaire modal.

* Commented out most of the styling in the questionnaire at this point.

* Have now commented out all styles that are not required for basic structure. Purging unused code next.

* Removed all unused selectors from the .styl document for questionnaire viewer. Ready to rebuild the style back up now.

* Completed the initial rebuild of the Questionnaire viewer styles to integrate with the Hazmapper design aesthetic. Still working on a few question types - ranged options specifically - but otherwise clean layout now.

* Added styling for the rangeAnswer elements. None of the questionnaire content indicates a selected state so I set a value anyway in case we update the view code to include that attribute.

* Changes the scope of image selectors in the questionnaire to only style images embedded within the questionnaire modal. Added support for both rangeSelect question and matrixTable question styling. Adjusted overall font sizes and layout for better legibility and use of white-space.

* Ran linting on the css.

* Cleaned up a mistake in css. Linting seems to regenerate unused style code locally. Investigating, but this commit is clean.

* task/wg-166-questionnaire-preview-title (#171)

* task/wg-166-questionnaire-preview-title

* Added padding for detail header for long titles

* Linting

* Prettier linting

* Revert style linting

* Remove event emitters, select node event and
selected tree node property, and use the activeFeature subscription
instead to pull the file name. Added a function to extract file name from
activeFeature display_path.

* Remove unused import

* Take file naming out of try block

* Remove diff

* A quick tweak to the Sub-question styling to clean it up a little and add some padding. (#174)

* Fix z-index of asset-detail so its below modal (#173)

* Task/wg 174 & 175 improve right panel questionnaire pic scroll and metadata (#176)

* task/WG-174-Improve-right-panel-questionnaire-metadata

* Used FeatureType() function to get find
questionnaire assets and consolidated logic

* task/WG-188: fix questionnaire detail panel (#177)

* Fix questionnaire-detail so it updates when feature changes

Also handle the cae where there are no properites._hazmapper.questionnaire.asset
because it is a questionnaire without assets

* Handle case when no feature is active

* Fix linting

* Rework layout of questionnaire to take all space (#178)

* Rework layout of questionnaire to take all space

* Fix linting

* Disable custom analytics-related headers (#179)

* Task/WG-171: Fix location question on questionnaire map (#186)

* Make map fill up the map container

* Add marker on location map

---------

Co-authored-by: John Gentle <[email protected]>
Co-authored-by: sophia-massie <[email protected]>
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