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

feat: Update search styling, part 1 [PT-188117054] #1356

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion rails/app/assets/stylesheets/themes/ngss-assessment.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ ngss-assessment-theme-styles {
background-size: 325px 100px;
}
}

#footer {
font-size: 15px;
text-align: center;
}

.search-form__ngss_info {
// hide link to NGSS Pathfinder when on NGSS portal
display: none;
}
}
24 changes: 21 additions & 3 deletions rails/app/assets/stylesheets/web/search_materials.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@
width: 350px;
}
}
.search-form__ngss_info {
font-size: 18px;
line-height: normal;
text-align: center;
vertical-align: middle;

@media screen and (max-width: 950px) {
br { display: none;} // remove line break on smaller screens
}

a {
color: #ea6d2f;
}
}
input[type="submit"] {
padding: 12px 20px 11px !important;
width: auto !important;
Expand Down Expand Up @@ -75,8 +89,8 @@
.filter-group__options {
background: #fff;
border: solid 1px #999;
height: 126px;
max-height: 126px;
height: 146px;
max-height: 146px;
overflow-x: hidden;
overflow-y: scroll;
padding: 5px;
Expand All @@ -85,6 +99,11 @@

label {
text-transform: none;
vertical-align: middle;
}

input[type="checkbox"] {
vertical-align: middle;
}

&.select-menu {
Expand Down Expand Up @@ -118,7 +137,6 @@

.filter-group__options {
height: auto;
max-height: 63px;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions rails/app/controllers/help_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class HelpController < ApplicationController
def index
help_type = current_settings.help_type
get_help_page(help_type)
@extra_options = {:isHelp => true}
end

def preview_help_page
Expand Down
7 changes: 7 additions & 0 deletions rails/app/views/home/home.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
= render :partial => "notice"

- # hide intro for logged in users
- if @current_user != nil
%style{media: "screen"}
:plain
#page-introduction { display: none; }
.portal-pages-header-contain { margin-bottom: 0; }
#portal-pages-finder { padding-top: 20px !important; }
.landing-container
.home-page-content
- if custom_content.blank?
Expand Down
4 changes: 2 additions & 2 deletions rails/app/views/search/_filters.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
.filter-group__options.webkit_scrollbars
= check_box_tag 'material_properties[]', SearchModelInterface::RunsInBrowser, @form_model.runs_in_browser, :id => 'runs_in_browser'
%label.tooltip
Runs In Browser
Runs in browser
%span.tip
These materials do not launch a Java webstart application.
%br
= check_box_tag 'material_properties[]', SearchModelInterface::RequiresDownload, @form_model.requires_download, :id => 'requires_download'
%label.tooltip
Requires Download
Requires download
%span.tip
These materials download a file to your computer, and start using Java Web Start.
%br
Expand Down
2 changes: 1 addition & 1 deletion rails/app/views/search/_sensors_filter.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Sensors
.filter-group__options.webkit_scrollbars
= check_box_tag 'no_sensors', '1', @form_model.no_sensors, :id=>'sensor_0', :class=>'sensor_filter_item'
= label_tag 'sensor_0', 'Sensors Not Necessary', :class=>'sensors_label'
= label_tag 'sensor_0', 'Sensors not necessary', :class=>'sensors_label'
%br
- @form_model.available_sensors.uniq.sort_by { |sensor| sensor.downcase }.each do |sensor|
- id = "sensor_#{sensor.squish.downcase.tr(" ","_")}"
Expand Down
5 changes: 4 additions & 1 deletion rails/app/views/search/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
SEARCH
.search-form__field
#auto-suggest-placeholder
.search-form__ngss_info
Search here or head over to our <br/> <a href="https://concord.org/ngss/">NGSS Pathfinder!</a>
= render :partial=>"search/filters"
= hidden_field_tag 'investigation_page', (@form_model.investigation_page rescue 1)
= hidden_field_tag 'activity_page', (@form_model.activity_page rescue 1)
Expand Down Expand Up @@ -38,7 +40,8 @@
name: "search_term",
query: query,
onSubmit: autoSuggestSubmit,
getQueryParams: function () { return jQuery(form).serialize() }
getQueryParams: function () { return jQuery(form).serialize() },
placeholder: "Type search term here"
}, 'auto-suggest-placeholder')
}

Expand Down
2 changes: 2 additions & 0 deletions rails/app/views/shared/_project_header.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- options[:sitewideAlert] = current_settings.sitewide_alert
- if local_assigns[:extra_options]
- options.merge!(extra_options)
- elsif @extra_options
- options.merge!(@extra_options)

%script{:type=>"text/javascript"}
var pageHeaderOptions = #{raw options.to_json};
Expand Down
18 changes: 9 additions & 9 deletions rails/features/teacher_filters_instructional_materials.feature
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,26 @@ Feature: Teacher filters instructional materials
And I wait for the search to be ready
Then I should see "My grade 5 Math Activity"
And I should not see "My grade 7 Science Activity"

When I check "Science"
And I uncheck "Math"
And I wait for the search to be ready

Then I should see "My grade 7 Science Activity"
And I should not see "My grade 5 Math Activity"

When I uncheck "Math"
And I uncheck "Science"
And I check "grade_level_7-8"
And I wait for the search to be ready

Then I should not see "My grade 5 Math Activity"
And I should see "My grade 7 Science Activity"

When I uncheck "grade_level_7-8"
And I check "grade_level_5-6"
And I wait for the search to be ready

Then I should see "My grade 5 Math Activity"
And I should not see "My grade 7 Science Activity"

Expand Down Expand Up @@ -107,16 +107,16 @@ Feature: Teacher filters instructional materials
Then I should see "My Temperature Sensor Activity"
And I should not see "My Force Sensor Activity"
And I should not see "My No Sensor Activity"

When I check "Force"
And I wait for the search to be ready
Then I should see "My Temperature Sensor Activity"
And I should see "My Force Sensor Activity"
And I should not see "My No Sensor Activity"

When I uncheck "Temperature"
And I uncheck "Force"
And I check "Sensors Not Necessary"
And I check "Sensors not necessary"
And I wait for the search to be ready
Then I should see "My No Sensor Activity"
And I should not see "My Force Sensor Activity"
Expand Down
Loading
Loading