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

Operating Authority Added Dropdown Menu View, Step Indicator, Print Notary #169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

susannegov
Copy link
Contributor

This is related to cityofaustin/atd-data-tech#20330 for Step Indicator and Menu view in Operating Authority.
The Dropdown Menu is documented here - https://atd-dts.gitbook.io/atd-knack-operations/knack-code/looks/dropdown-menu-buttons

Apologies that this is a lot since most of this was inherited from the earlier prototype github issue cityofaustin/atd-data-tech#19617

Changes in JavaScript

Added Big Button for Operating Authority (currently hidden using a page rule where user role contains `Customer`)
  • Line 36-39
Update comment on menu views for print between Chauffeur Permit and Operating Authority
  • Line 124 and Line 133
Added Print Menu Button for Operating Authority Notary
  • Line 146-150.
  • The recording it shows yellow/blue text for some reason in GIF but it does not look like that on browser.
    BA317EEF-FA14-45A0-9C9A-A4CA6BBE36FF
Added Dropdown Menu View navigation
  • See GitBook documentation from TIA - https://atd-dts.gitbook.io/atd-knack-operations/knack-code/looks/dropdown-menu-buttons
  • Got the confirmation from Patrick to add it. The Step Indicator and Menu view in Operating Authority atd-data-tech#20330 goes over the old one with the menu view versus the dropdown menu view (note this was before CSS was added)
    • We talked about possibly having the link come from the step indicator but the amount of custom code needed and the step indicator not being scalable we shelved it for dropdown menu view as it already works in the TIA app
  • Some modifications from the JS include changing tia to oa naming
  • Using a dictionary for {view_number:"Form Name"} line 215-217 for the 6 pages that need the specific menu view.
  • Using a for key in viewNameOA in the dictionary for the six form pages starting from line 219-241
  • Added a <br> tag before the appendTo to fix visual spacing in line 239.
  • Removed icon styling to specify the step name.
  • Tested all step indicator pages for menu view and it works as expected
    237DAB99-67E2-4EA9-BF31-A665580B3DED

Changes in CSS

  • Added CSS for Operating Authority Step Indicator and Print page
  • Line 197 was commented out to prevent a visual bug with the big trigger buttons in Chauffeur Permit.
  • Added comment on line 49 to specify Chauffeur Permit
  • Added class for #oa line 57-65 to change the width of step indicator . Width is based on how many steps and since the Chauffeur form is 4 steps while Operating Authority is 6 steps, I hade to change the width.
  • Added Dropdown Menu CSS Line 240-286. Changed name of tia to oa
  • Removed extra space in line 334
  • Added print CSS to hide form when printing and hide text on web but allow on printing. This saves the applicant 1 click instead of 2. In Line 406-419

- Added Big Button for Operating Authority (currently hidden using a page rule unless a Company user role)
- Update comment on menu views for print between Chauffuer Permit and Operating Authority
- Added print menu button for Operating Authority
- Added Dropdown Menu View navigation (see gitbook)
- Added CSS for Operating Authority Step Indicator and Print page
@susannegov susannegov added CSS Modified CSS code JavaScript Modified JavaScript code Knack Any Knack related PR's labels Dec 31, 2024
@susannegov susannegov self-assigned this Dec 31, 2024
Copy link
Member

@johnclary johnclary left a comment

Choose a reason for hiding this comment

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

Code looks good and i am following your changes and how they are being used in the app. I did not test this! Thanks for the TIL 😄

#view_640, #view_639 {
display:none;
}
@media print {
Copy link
Member

Choose a reason for hiding this comment

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

TIL the print media query 💡

// Dictonary of views needing dropdown menu in editable Operating Authority (OA) pages
var viewNameOA = {687:"1 - Service Type",676:"2 - Business Information",689:"3 - Insurance",
691:"4 - Authorized Person", 693:"5 - Vehicle Information", 695:"6 - Review and Submit"};
Copy link
Member

Choose a reason for hiding this comment

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

it would be nice to run this new code through a formatter. we typically use prettier, and there are plugins for most of the major IDEs.

for example, it'd be nice to have this object prettified:

var viewNameOA = {
  687: "1 - Service Type",
  676: "2 - Business Information",
  689: "3 - Insurance",
  691: "4 - Authorized Person",
  693: "5 - Vehicle Information",
  695: "6 - Review and Submit",
};

Copy link
Member

@ChrispinP ChrispinP left a comment

Choose a reason for hiding this comment

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

There were a few things I noticed. They should be pretty easy fixes. Overall make sure your code looks & functions on mobile as well. Hope this helps!

code/mobility-services/mobility-services.css Outdated Show resolved Hide resolved
@@ -46,14 +46,23 @@
}

/* This is for the bars */
.progressbar li{
.progressbar li{ /* Chauffeur Permit Form */
Copy link
Member

Choose a reason for hiding this comment

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

Might be worth moving these comments to new lines above as section headers so its easier to find each section

}

/* hide knack menu buttons if on desktop */
@media (min-width: 799px) {
Copy link
Member

Choose a reason for hiding this comment

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

you might want to double check this pixel width, Knack doesnt always display mobile correctly at 799px. Im using 767.9px & 768px in ROW Portal right now. you should see the hamburger menu in the top right on mobile

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 did not test this in mobile. 🫠 I borrowed some of the JS/CSS from ROW since it had the mobile codes.

FYI I found that the dropdown menu list is not good with touch screens due to lack of hover functionality (on my laptop touchscreen).

/****************************************/

/* hide custom menu if on mobile */
@media (max-width: 799px) {
Copy link
Member

Choose a reason for hiding this comment

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

you might want to double check this pixel width, Knack doesnt always display mobile correctly at 799px. Im using 767.9px & 768px in ROW Portal right now.

code/mobility-services/mobility-services.css Outdated Show resolved Hide resolved
code/mobility-services/mobility-services.css Show resolved Hide resolved
code/mobility-services/mobility-services.js Outdated Show resolved Hide resolved
Added Prettier and mobile styling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Modified CSS code JavaScript Modified JavaScript code Knack Any Knack related PR's
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants