Skip to content

Commit dc49d09

Browse files
committed
Remove fact panels
Why are these changes being introduced: * We are moving to TACOS suggestions instead of fact panels * Fact panels was an initial implementation we later extracted into TACOS Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/USE-65 Document any side effects to this change: * Not all fact panels will be replaced initially with TACOS suggestions
1 parent 22eb852 commit dc49d09

24 files changed

+23
-795
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ See `Optional Environment Variables` for more information.
9393
- `BOOLEAN_OPTIONS`: comma separated list of values to present to testers on instances where `BOOLEAN_PICKER` feature is enabled.
9494
- `BOOLEAN_PICKER`: feature to allow users to select their preferred boolean type. If set, feature is enabled. This feature is only intended for internal team
9595
testing and should never be enabled in production (mostly because the UI is a mess more than it would cause harm).
96-
- `FACT_PANELS_ENABLED`: Comma separated list of enabled fact panels. See `/views/results.html.erb` for implemented panels/valid options. Leave unset to disable all.
9796
- `FILTER_ACCESS_TO_FILES`: The name to use instead of "Access to files" for that filter / aggregation.
9897
- `FILTER_CONTENT_TYPE`: The name to use instead of "Content type" for that filter / aggregation.
9998
- `FILTER_CONTRIBUTOR`: The name to use instead of "Contributor" for that filter / aggregation.

app/assets/stylesheets/partials/_panels.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,6 @@
6262
}
6363
}
6464

65-
.fact {
66-
.panel {
67-
margin-top: 0;
68-
69-
.panel-heading {
70-
margin-top: 0;
71-
padding-top: 16.8px;
72-
}
73-
}
74-
}
75-
7665
.ask-us {
7766
margin-top: 3rem;
7867
a {

app/controllers/fact_controller.rb

Lines changed: 0 additions & 27 deletions
This file was deleted.

app/helpers/record_helper.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
module RecordHelper
2-
def doi(metadata)
3-
dois = metadata['identifiers']&.select { |id| id['kind'].downcase == 'doi' }
4-
return unless dois.present?
5-
6-
dois.first['value']
7-
end
8-
92
def date_parse(date)
103
return unless date.present?
114

app/helpers/results_helper.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
module ResultsHelper
2-
def fact_enabled?(fact_type)
3-
ENV.fetch('FACT_PANELS_ENABLED', false).split(',').include?(fact_type)
4-
end
5-
62
def results_summary(hits)
73
hits.to_i >= 10_000 ? '10,000+ results' : "#{number_with_delimiter(hits)} results"
84
end

app/models/fact_doi.rb

Lines changed: 0 additions & 44 deletions
This file was deleted.

app/models/fact_isbn.rb

Lines changed: 0 additions & 51 deletions
This file was deleted.

app/models/fact_issn.rb

Lines changed: 0 additions & 63 deletions
This file was deleted.

app/models/fact_pmid.rb

Lines changed: 0 additions & 42 deletions
This file was deleted.

app/views/fact/doi.html.erb

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)