Skip to content

Commit ddc2153

Browse files
committed
minor UI changes
1 parent 2bfae96 commit ddc2153

9 files changed

Lines changed: 25 additions & 24 deletions

File tree

examples/project_website/data-config_base.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ var data_config = {
4848
show_cite_button: true,
4949

5050
highlight_query_terms: true,
51+
show_context_oa_number: false,
5152
};

examples/project_website/data-config_pubmed.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ var data_config = {
4646

4747
show_cite_button: true,
4848

49-
highlight_query_terms: true
49+
highlight_query_terms: true,
50+
show_context_oa_number: false,
5051

5152
};

vis/js/components/Headstart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ const Headstart = ({
4848
</div>
4949
)}
5050
{renderList && <List />}
51+
<Footer />
5152
</div>
5253
<Toolbar />
5354
<Modals />
54-
<Footer />
5555
</LocalizationProvider>
5656
);
5757
};

vis/js/default-config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,10 @@ var config = {
548548
embed_button_text: 'Copy',
549549
embed_title: 'embed map',
550550
embed_body_text: 'You can use this code to embed the visualization on your own website or in a dashboard.',
551-
high_metadata_quality: "High metadata quality",
551+
high_metadata_quality: "Data quality",
552552
high_metadata_quality_desc_base: "This knowledge map only includes documents with an abstract (min. 300 characters). High metadata quality significantly improves the quality of your knowledge map.",
553553
high_metadata_quality_desc_pubmed: "This knowledge map only includes documents with an abstract. High metadata quality significantly improves the quality of your knowledge map.",
554-
low_metadata_quality: "Low metadata quality",
554+
low_metadata_quality: "Data quality",
555555
low_metadata_quality_desc_base: "This knowledge map includes documents with and without an abstract. Low metadata quality may significantly reduce the quality of your knowledge map. ",
556556
low_metadata_quality_desc_pubmed: "This knowledge map includes documents with and without an abstract. Low metadata quality may significantly reduce the quality of your knowledge map. ",
557557
area_streamgraph: "Stream",
@@ -573,7 +573,7 @@ var config = {
573573
search_placeholder: "Search within visualization...",
574574
show_list: "Show list",
575575
hide_list: "Hide list",
576-
intro_label: "more info",
576+
intro_label: "More info",
577577
relevance: "relevance",
578578
readers: "readers",
579579
tweets: "tweets",

vis/js/templates/Paper.jsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import Highlight from "../components/Highlight";
33
import Hyphenate from "../components/Hyphenate";
44

55
import { select } from "d3-selection";
6+
import { formatPaperDate } from "./listentry/Title";
67

78
class Paper extends React.Component {
89
constructor(props) {
910
super(props);
1011
// TODO rewrite this using https://www.npmjs.com/package/core-decorators#autobind ?
11-
this.getCoordinatesAndDimensions = this.getCoordinatesAndDimensions.bind(
12-
this
13-
);
12+
this.getCoordinatesAndDimensions =
13+
this.getCoordinatesAndDimensions.bind(this);
1414
this.isAnimated = this.isAnimated.bind(this);
1515
this.animate = this.animate.bind(this);
1616
this.animatePath = this.animatePath.bind(this);
@@ -104,10 +104,8 @@ class Paper extends React.Component {
104104
const { x, y, width: baseWidth, height: baseHeight } = this.state;
105105
const { path: basePath, dogEar: baseDogEar } = this.state;
106106

107-
let {
108-
width: realWidth,
109-
height: realHeight,
110-
} = this.getCoordinatesAndDimensions();
107+
let { width: realWidth, height: realHeight } =
108+
this.getCoordinatesAndDimensions();
111109

112110
const handleMouseOver = () => {
113111
let newEnlargeFactor = null;
@@ -227,7 +225,12 @@ class Paper extends React.Component {
227225
<Hyphenate>
228226
<Highlight hyphenated queryHighlight>
229227
{title}
228+
</Highlight>{" "}
229+
(
230+
<Highlight queryHighlight>
231+
{formatPaperDate(year)}
230232
</Highlight>
233+
)
231234
</Hyphenate>
232235
</p>
233236
<p id="details" className={sizeModifierClass}>
@@ -248,10 +251,6 @@ class Paper extends React.Component {
248251
</Hyphenate>
249252
</>
250253
)}
251-
<span className="pubyear">
252-
{" "}
253-
(<Highlight queryHighlight>{year}</Highlight>)
254-
</span>
255254
</p>
256255
</div>
257256
{!!readersLabel &&
@@ -455,10 +454,10 @@ const getMetadataHeight = (realHeight, hasReaders, isZoomed) => {
455454
}
456455

457456
const height = realHeight - readersHeight;
458-
457+
459458
if (height >= 20) {
460459
return height;
461460
}
462461

463462
return 20;
464-
}
463+
};

vis/js/templates/listentry/Title.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { getDateFromTimestamp } from "../../utils/dates";
88
import { mapDispatchToListEntriesProps } from "../../utils/eventhandlers";
99
import useMatomo from "../../utils/useMatomo";
1010

11-
const MAX_TITLE_LENGTH = 150;
11+
const MAX_TITLE_LENGTH = 160;
1212

1313
const Title = ({
1414
paper,
@@ -37,7 +37,7 @@ const Title = ({
3737

3838
const rawTitle = paper.title ? paper.title : loc.default_paper_title;
3939

40-
const formattedDate = ` (${formatDate(paper.year)})`;
40+
const formattedDate = ` (${formatPaperDate(paper.year)})`;
4141
const formattedTitle = isSelected
4242
? rawTitle
4343
: formatTitle(rawTitle, MAX_TITLE_LENGTH - formattedDate.length);
@@ -62,7 +62,7 @@ const mapStateToProps = (state) => ({
6262

6363
export default connect(mapStateToProps, mapDispatchToListEntriesProps)(Title);
6464

65-
const formatDate = (date) => {
65+
export const formatPaperDate = (date) => {
6666
const strDate = date.toString();
6767
let format = "yyyy-mm-dd";
6868
if (strDate.match(/^\d{4}(-\d{2})?$/)) {

vis/js/utils/dimensions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import $ from "jquery";
22

33
// these constants are hardcoded dimensions of various headstart parts
4-
const TITLE_HEIGHT = 54.7;
4+
const TITLE_HEIGHT = 57;
55
const TOOLBAR_HEIGHT = 66;
66
const TITLE_IMAGE_HEIGHT = 70;
77
const SHOW_HIDE_BTN_HEIGHT = 34;

vis/stylesheets/modules/list/_entry.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,6 @@ img#preview_page {
572572

573573
.list_metadata .list_title {
574574
font-size: 13px;
575-
max-width: 72%;
576575
}
577576

578577
#list_abstract {

vis/stylesheets/modules/map/_header.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858

5959
#context {
60-
font-size: 11px;
60+
font-size: 12px;
6161
color: $black;
6262
.context_moreinfo {
6363
border-bottom: 1px solid $link-gray;
@@ -302,6 +302,7 @@
302302
display: inline-block;
303303
margin-right: 1%;
304304
height: 15px;
305+
margin-bottom: 3px;
305306
}
306307

307308
//.context_metadata_high {

0 commit comments

Comments
 (0)