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

Bump bcrypt from 3.0.6 to 5.0.0 #64

Open
wants to merge 104 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
cc7865c
doc renderer supports sections
Jutanium Dec 14, 2020
0c7d6c6
delete docs config from repo
Jutanium Dec 14, 2020
2fb0831
broken parseInner function
Jutanium Dec 16, 2020
6e2b993
working parseInner function
Jutanium Dec 16, 2020
b9ad051
no docsconfig file warning
Jutanium Dec 19, 2020
8514589
Merge branch 'docs-integration'
Jutanium Dec 20, 2020
e555af0
added vis back
Dec 20, 2020
5337492
Merge pull request #69 from GeorgiaTechDHLab/playfair-covid-vis
jianingfu Dec 20, 2020
398b054
added uk covid data
Dec 21, 2020
d55374d
Merge pull request #70 from GeorgiaTechDHLab/playfair-covid-vis
jianingfu Dec 21, 2020
06c15e2
fix type function error
Jutanium Dec 21, 2020
3d6682d
footnote & inline slot support
Jutanium Dec 21, 2020
c8b9645
Merge branch 'master' of https://github.com/GeorgiaTechDHLab/DataByDe…
Jutanium Dec 21, 2020
f080a1e
basic inline slot inner text support
Jutanium Dec 21, 2020
b0d1482
deal with objects before first section
Jutanium Dec 21, 2020
9b3f19f
peabody is docs
Jutanium Dec 21, 2020
66935a9
complete covid data, bug fix, add router link to playfair chapter
Dec 22, 2020
6ebf1a2
Merge pull request #71 from GeorgiaTechDHLab/playfair-covid-vis
jianingfu Dec 22, 2020
8dbefe7
don't render empty paragraphs
Jutanium Dec 22, 2020
26cbe0b
proper subsection tracking
Jutanium Dec 22, 2020
057c8a9
Merge pull request #72 from GeorgiaTechDHLab/peabody-docs
Jutanium Dec 22, 2020
109626e
don't show title header for the introduction section
Jutanium Dec 22, 2020
582f6d5
fix and clealeanup playfair Vue options (was previously a copy of Pea…
Jutanium Dec 22, 2020
8ed5932
add prod script
Jutanium Dec 22, 2020
4b29c57
templates done
Jutanium Dec 22, 2020
f0f8394
add more datasets
Dec 22, 2020
e6d10f1
added vis
Dec 23, 2020
493bc45
Merge pull request #73 from GeorgiaTechDHLab/playfair-covid-vis
jianingfu Dec 23, 2020
8a66d73
add script and mode-specific .env file to run remote server
Jutanium Dec 23, 2020
19ef063
Merge branch 'master' of https://github.com/GeorgiaTechDHLab/DataByDe…
Jutanium Dec 23, 2020
8855127
add coxcomb, add dataSelection for covid, women, income
Dec 23, 2020
d9e476e
Merge pull request #74 from GeorgiaTechDHLab/playfair-covid-vis
jianingfu Dec 23, 2020
61cd893
adjust coxcomb
Dec 24, 2020
1ecd773
Merge pull request #75 from GeorgiaTechDHLab/playfair-covid-vis
jianingfu Dec 24, 2020
7ff77c4
second version
Dec 24, 2020
1520e2e
Merge pull request #76 from GeorgiaTechDHLab/playfair-covid-vis
jianingfu Dec 24, 2020
9de820c
footnotes load from doc
Jutanium Dec 25, 2020
68443bc
blockquote component
Jutanium Dec 25, 2020
51ed39f
captionedimage component
Jutanium Dec 25, 2020
bbfaf3e
captionedimage component
Jutanium Dec 25, 2020
e3a6d3f
Merge branch 'master' of https://github.com/GeorgiaTechDHLab/DataByDe…
Jutanium Dec 25, 2020
80be1e7
captioned image width fix
Jutanium Dec 25, 2020
3ec4ee5
Merge pull request #77 from GeorgiaTechDHLab/dxd-text
laurenfklein Dec 26, 2020
dbb1406
playfair navline integration. extract common functionality into navli…
Jutanium Dec 28, 2020
3c50fb6
remove notebooktypes console log
Jutanium Dec 28, 2020
c429d2f
fix homepage timeline hover layers
Dec 28, 2020
414f4ba
Merge pull request #78 from GeorgiaTechDHLab/timeline-fix
jianingfu Dec 28, 2020
6b01127
Update README.md
Jutanium Dec 29, 2020
52578a8
Merge branch 'master' into dxd-text
laurenfklein Dec 31, 2020
ad35025
Merge pull request #79 from GeorgiaTechDHLab/dxd-text
laurenfklein Dec 31, 2020
6d366d5
Updated Playfair vis with final (?) images and captions; removed unus…
laurenfklein Dec 31, 2020
dcad854
Changed some label text and tweaked the label layout
laurenfklein Dec 31, 2020
862ac90
Merge pull request #80 from GeorgiaTechDHLab/dxd-text
laurenfklein Dec 31, 2020
5b18dcd
fix img filename discrepancy
Jutanium Dec 31, 2020
901303e
DocRenderer in its own repo; CaptionedImage registers on the timeline…
Jutanium Dec 31, 2020
e70f9c0
Merge pull request #81 from GeorgiaTechDHLab/modularize-docs-integration
Jutanium Dec 31, 2020
8552936
playfair vis fix
Dec 31, 2020
99ca581
Merge pull request #82 from GeorgiaTechDHLab/playfair_fix
jianingfu Dec 31, 2020
5c177ce
A few more text/image/caption additions to the Peabody and Playfair c…
laurenfklein Jan 1, 2021
63933de
Merge branch 'master' into dxd-text
laurenfklein Jan 1, 2021
f9b9e4a
Merge pull request #83 from GeorgiaTechDHLab/dxd-text
laurenfklein Jan 1, 2021
26d84cc
Replaced thumbnails in timeilne; updated chapter titles throughout
laurenfklein Jan 3, 2021
1205057
Merge pull request #84 from GeorgiaTechDHLab/dxd-text
laurenfklein Jan 3, 2021
5688ea0
Updated peabody chapter router link
laurenfklein Jan 3, 2021
7d9b33f
picline fix
Jan 3, 2021
e461f24
Merge pull request #85 from GeorgiaTechDHLab/homepage-fix
jianingfu Jan 3, 2021
631ac87
fix reduntant "lines of exports"
Jutanium Jan 3, 2021
2272209
begin removing unused files
Jutanium Jan 3, 2021
757d828
fix priestly -> priestley
Jutanium Jan 3, 2021
41ce85e
minor fix
Jan 3, 2021
d949bab
Merge pull request #86 from GeorgiaTechDHLab/playfair-fix
jianingfu Jan 3, 2021
db37fb2
Tweak caption of covid/income/women vis
laurenfklein Jan 4, 2021
8904f0a
add hover over
Jan 4, 2021
270e45b
Merge branch 'master' into playfair-fix
jianingfu Jan 4, 2021
7b7c40a
Merge pull request #87 from GeorgiaTechDHLab/playfair-fix
jianingfu Jan 4, 2021
4c4d685
Added/tweaked vis captions
laurenfklein Jan 4, 2021
bec226f
Merge branch 'master' of https://github.com/GeorgiaTechDHLab/DataByDe…
laurenfklein Jan 4, 2021
65306c8
fix stacked bar
Jan 4, 2021
9874e23
Merge branch 'master' into playfair-fix
jianingfu Jan 4, 2021
a1b4108
Merge pull request #88 from GeorgiaTechDHLab/playfair-fix
jianingfu Jan 4, 2021
27e3339
make header less obtrusive
Jutanium Jan 5, 2021
31360e8
adjust home page margin
Jutanium Jan 5, 2021
4fe1644
align header with chapter when resizing
Jutanium Jan 5, 2021
c002ea6
fix offset accuracy; add pause feature
Jutanium Jan 6, 2021
f4abace
fix offset accuracy; add pause feature
Jutanium Jan 6, 2021
3559f85
Merge branch 'playfair-todos' of github.com:GeorgiaTechDHLab/DataByDe…
Jutanium Jan 6, 2021
83c7e48
playfair scrollytell
Jutanium Jan 6, 2021
1c2a6b9
Merge pull request #90 from GeorgiaTechDHLab/playfair-todos
Jutanium Jan 6, 2021
83dffdc
fix d3 size
Jan 6, 2021
4b71663
Merge pull request #91 from GeorgiaTechDHLab/playfair-fix
jianingfu Jan 6, 2021
10437d4
grid todos
Jutanium Jan 7, 2021
179b8c0
Merge branch 'master' of github.com:GeorgiaTechDHLab/DataByDesign
Jutanium Jan 7, 2021
d0f4e86
Added floorchart images
laurenfklein Jan 7, 2021
1e66548
Merge branch 'master' of https://github.com/GeorgiaTechDHLab/DataByDe…
laurenfklein Jan 7, 2021
3e2e8f8
finally much better collect
Jutanium Jan 7, 2021
86bc6f2
added dot domain
Jan 7, 2021
3e121c0
Merge pull request #92 from GeorgiaTechDHLab/playfair-fix
jianingfu Jan 7, 2021
0ae4adf
(hopefull) fix glitchy second scrollytell
Jutanium Jan 8, 2021
5c6fed0
finish todos
Jutanium Jan 8, 2021
bd52fc7
Updated Playfair process vis text
laurenfklein Jan 8, 2021
b7e9b28
Added missing caption
laurenfklein Jan 8, 2021
da0fafe
Tweaked image sizes
laurenfklein Jan 8, 2021
b6b0de9
adjust easing on playfair mapscroller
Jutanium Jan 8, 2021
5b8f4d6
Bump bcrypt from 3.0.6 to 5.0.0
dependabot[bot] Jan 8, 2021
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
Prev Previous commit
Next Next commit
deal with objects before first section
  • Loading branch information
Jutanium committed Dec 21, 2020
commit b0d14827d70fd03ef94d8d5b45e242c779f6b466
56 changes: 32 additions & 24 deletions client/src/docs-integration/DocRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@ import api from "../api";
import registeredComponents from "./registered-components";
import {register} from "register-service-worker";
import FootnoteReference from "../components/general/FootnoteReference";
import Section from "../components/chapters/Section";

export default {
data () {
data() {
return {
docJson: null,
}
},
props: {
sectionRegex: {
type: RegExp,
default () {
default() {
return /<b>Section:(.+)<\/b>/g
}
},
sectionComponent: {
type: Object
type: Object,
default: () => Section
},
sectionTitleProp: {
type: String,
Expand All @@ -37,7 +39,7 @@ export default {
},
docId: String
},
render (h) {
render(h) {
if (!this.docJson) {
return h("p", "Loading...")
}
Expand All @@ -54,7 +56,7 @@ export default {
insertions.push({
start: match.index,
end: match.index + match[0].length,
insert: h(this.footnoteRefComponent, { props: { [this.footnoteRefProp]: number } } )
insert: h(this.footnoteRefComponent, {props: {[this.footnoteRefProp]: number}})
})
}
for (let match of inlineSlotMatches) {
Expand All @@ -73,8 +75,8 @@ export default {
const returnArr = [];
let lastIndex = 0;
insertions
.sort( (a, b) => a.start - b.start)
.forEach( ( {start, end, insert}) => {
.sort((a, b) => a.start - b.start)
.forEach(({start, end, insert}) => {
if (lastIndex != start)
returnArr.push(node.data.slice(lastIndex, start))
returnArr.push(insert);
Expand All @@ -90,9 +92,9 @@ export default {
)
);
if (node.hasChildNodes) {
return h(node.tagName, { attrs }, map(node.childNodes, nodeToVDOM));
return h(node.tagName, {attrs}, map(node.childNodes, nodeToVDOM));
}
return h(node.tagName, { attrs });
return h(node.tagName, {attrs});
}

const parseInner = innerData => {
Expand All @@ -116,7 +118,7 @@ export default {
if (componentName in this.components) {
const component = registeredComponents[componentName];
let props = {};
data.rows.forEach( ([propName, value]) => {
data.rows.forEach(([propName, value]) => {
if (propName in component.props) {
const constructor = component.props[propName].type || component.props[propName];
const coerced = constructor();
Expand Down Expand Up @@ -147,12 +149,12 @@ export default {

if (this.sectionRegex && this.sectionComponent) {
const sections = [];
content.forEach( (el, index) => {
content.forEach((el, index) => {
const [key, value] = Object.entries(el)[0];
if (typeof value == "string") {
const firstMatch = this.sectionRegex.exec(value);
if (firstMatch && firstMatch.length >= 1) {
let pushObj = { index };
let pushObj = {index};
if (firstMatch.length == 2) {
pushObj.title = firstMatch[1];
}
Expand All @@ -161,18 +163,24 @@ export default {
}
});
if (sections.length > 0) {
return h('div',
sections.map( ({index, title}, arrIndex) =>
(
h(this.sectionComponent, {
props: {[this.sectionTitleProp]: title}
},
content
.slice(index + 1, sections[arrIndex + 1] ? sections[arrIndex + 1].index : content.length)
.map(createFromObj)
)
)
));
// if (sections[0].)
console.log(sections);
const renderArr = [];
if (sections[0].index != 0) {
renderArr.push(...(content.slice(0, sections[0].index).map(createFromObj)));
}
renderArr.push(...sections.map(({index, title}, arrIndex) =>
(
h(this.sectionComponent, {
props: {[this.sectionTitleProp]: title}
},
content
.slice(index + 1, sections[arrIndex + 1] ? sections[arrIndex + 1].index : content.length)
.map(createFromObj)
)
)
));
return h('div', renderArr);
}
}

Expand Down