-
Notifications
You must be signed in to change notification settings - Fork 0
Use 65 tacos interventions #241
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| /* Color Variables */ | ||
|
|
||
| // Core | ||
| $blue-500: #0000FF; | ||
|
|
||
| $purple-700: #990099; | ||
|
|
||
| $white: #fff; | ||
| $gray-100: #F2F2F2; | ||
| $black: #111; | ||
|
|
||
| @mixin focus-outline { | ||
| &:focus { | ||
| outline: 3px solid $blue-500; | ||
| } | ||
| } | ||
|
|
||
| @mixin hover-transition { | ||
| transition: all .25s ease-in-out 0s; | ||
| } | ||
|
|
||
| // Semantic | ||
| $color-suggestion-border: $purple-700; | ||
| $color-suggestion-accent-text: $purple-700; | ||
|
|
||
| /* Suggestion Panel */ | ||
| .mitlib-suggestion-panel { | ||
| border: 4px solid $color-suggestion-border; | ||
|
|
||
| display: flex; | ||
| column-gap: 24px; | ||
|
|
||
| padding: 20px 24px; | ||
| position: relative; | ||
|
|
||
| .panel-type { | ||
| color: $color-suggestion-accent-text; | ||
| font-size: 14px; | ||
| font-weight: 600; | ||
| margin-bottom: 8px; | ||
| } | ||
|
|
||
| h3 { | ||
| font-size: 20px; | ||
| font-weight: 600; | ||
| line-height: 1.25; | ||
| margin-bottom: 8px; | ||
| } | ||
|
|
||
| p { | ||
| font-size: 16px; | ||
| } | ||
|
|
||
| ul.metadata { | ||
| font-size: 14px; | ||
| list-style: none inside; | ||
| padding-left: 0; | ||
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| // This would need to be extracted into an Icon Button in the future. | ||
| button.dismiss { | ||
| //Temporarily hiding until we can move to a prop | ||
| display: none; | ||
|
|
||
| width: 48px; | ||
| height: 48px; | ||
| position: absolute; | ||
| top: 0; | ||
| right: 0; | ||
|
|
||
| background-color: $white; | ||
| border: none; | ||
| color: $black; | ||
| cursor: pointer; | ||
| font-weight: 600; | ||
|
|
||
| @include hover-transition; | ||
|
|
||
| @include focus-outline; | ||
|
|
||
| &:hover { | ||
| background-color: $gray-100; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| /* Button styles to be extracted into button component */ | ||
| .button.secondary { | ||
| border: 1px solid $black; | ||
| border-radius: 0; | ||
| display: inline-block; | ||
| padding: 6px 12px; | ||
| text-decoration: none; | ||
| font-size: 16px; | ||
| font-weight: 600; | ||
|
|
||
| @include hover-transition; | ||
|
|
||
| @include focus-outline; | ||
|
|
||
| &:hover { | ||
| color: $white; | ||
| background-color: $black; | ||
| } | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,10 @@ class TacosController < ApplicationController | |
| def analyze | ||
| return unless ApplicationHelper.tacos_enabled? | ||
|
|
||
| Tacos.analyze(params[:q]) | ||
| tacos_response = Tacos.analyze(params[:q]) | ||
|
|
||
| # Suggestions return as an array but we don't want to display more than one. | ||
| # We may want to have a "priority" system in the future to determine which suggestion to show. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 to having this sort of logic, and +1 to not worrying about it now. The time for that sort of determination feels like "after we are getting more than just suggested resources back from TACOS" because then we'll have more things to sort through, in addition to multiple suggested resource matches. |
||
| @suggestions = tacos_response['data']['logSearchEvent']['detectors']['suggestedResources'].first | ||
| end | ||
| end | ||
This file was deleted.
This file was deleted.
This file was deleted.
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.
Non-blocking question (and maybe more for @djanelle-mit than you) - reading this stylesheet, it feels like the long-term plan for many of these variables, mixins, and other styles is to house them more centrally to the application stylesheet setup? Ultimately I think this partial could end up being just lines 27-59?
I don't mind this change as-is for now, but I want to confirm whether I understand the long-term plan correctly.
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.
@matt-bernhardt Yep, you're spot on! This was originally written into the TACOS repo with the variables colocated to keep things simple. I'm also going to be introducing more variables into the
_variablesstyle sheet with some of my upcoming work.I have a ticket to update some styling, I can make a note that it should include a refactor of the variables' location, too.