-
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
render link to cabinet details as menu button #78
base: master
Are you sure you want to change the base?
Conversation
@dianamartin @ChrispinP this only change is at the bottom of the file. |
@@ -873,3 +912,16 @@ $(document).on("knack-view-render.view_1252", function (event, page) { | |||
//////////////////////////////////////////// | |||
/// End Technician Time Log Validation /// | |||
//////////////////////////////////////////// | |||
|
|||
//// Update link text to cabinet details page from signal detals |
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.
Instead of JS, use this Trigger Button article styling the button with CSS and calling it with the HTML whenever you need 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.
ah, that's a cool trick! TIL. those docs are excellent!
in this case i'm styling a details link from a connection field, so i don't have control in the builder over what html is rendered by Knack. without this custom code, the link text would simply be the display field on the cabinets record.
for the CSS, i'm just using the same classes that knack uses on their menu buttons. that actually might be a nice improvement in your docs. you might not need to write any custom CSS if you can get by with the knack classes.
}); | ||
$coacdButton.appendTo("#" + viewId); | ||
|
||
// Append Big SSO Login button and non-SSO Login button | ||
bigButton("coacd-big-button", "coacd-button-login", url, "sign-in", "Sign-In") | ||
bigButton( |
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.
Curious on the reasoning of re-expanding the SSO code to take up more lines?
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.
this is the default formatting behavior of Prettier. i actually was surprised it picked up more linting, since i linted this code the last time i edited it a few months ago. it makes me wonder if knack does some kind of linting automatically, or if my linter settings changed somehow.
i'm happy to defer to the linter's opinions, which aim for more readable code over being concise. in the past we've talked about standardizing these settings and making sure we use them globally, basically the standard right now it prettier's default.
startField, | ||
endField | ||
)}`; | ||
errorMsgs = `${errorMsgs}${formatErrorMessage(startField, endField)}`; |
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.
This looks good condensed.
formDiv, | ||
errorMsgs | ||
); | ||
// show red error banner |
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.
This looks good condensed.
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.
Left my comments inline :)
@johnclary this ready to merge? |
@johnclary ping |
Related to cityofaustin/atd-data-tech#8032. Renders the cabinet details link as a menu button (instead of the cabinet ID)