Skip to content

Commit 2aa26cc

Browse files
authored
Merge pull request #1216 from complexdatacollective/fix/help-references
update help references
2 parents 1bfe6e6 + 1774032 commit 2aa26cc

File tree

14 files changed

+116
-83
lines changed

14 files changed

+116
-83
lines changed

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Security updates will only be issued for the most recent version(s) of the softw
88

99
## Reporting a Vulnerability
1010

11-
To report a security issue to us, please contact info@networkcanvas.com. We will work with you to resolve the issue.
11+
To report a security issue to us, please help us to troubleshoot it by creating a topic on our [community page](https://community.networkcanvas.com). We will work with you to resolve the issue.

src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const PROTOCOL_EXTENSION = '.netcanvas';
22

33
// Target protocol schema version. Used to determine compatibility & migration
4-
const APP_SCHEMA_VERSION = 8;
4+
const APP_SCHEMA_VERSION = 7;
55

66
const DEVICE_API_VERSION = '2'; // X-Device-API-Version
77

src/containers/Interfaces/DyadCensus/DyadCensus.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ const fadeVariants = {
2626
};
2727

2828
const optionsVariants = {
29-
show: { opacity: 1, transition: { delay: 0.35, duration: 0.25 } },
30-
hide: { opacity: 0, transition: { delay: 0.35, duration: 0.25 } },
29+
show: { opacity: 1, transition: { delay: 0.15, duration: 0.25 } },
30+
hide: { opacity: 0, transition: { delay: 0.15, duration: 0.25 } },
3131
};
3232

3333
const choiceVariants = {
34-
show: { opacity: 1, translateY: '0%', transition: { delay: 0.25, type: 'spring' } },
34+
show: { opacity: 1, translateY: '0%', transition: { delay: 0.15, type: 'spring' } },
3535
hide: { opacity: 0, translateY: '120%' },
3636
};
3737

src/containers/Interfaces/DyadCensus/Pair.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const animationTarget = -50;
88

99
const pairTransition = {
1010
duration: 0.5,
11-
delay: 0.35,
11+
delay: 0.15,
1212
when: 'afterChildren',
1313
};
1414

src/containers/Interfaces/Narrative.js

Lines changed: 57 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { getNetworkEdges, getNetworkNodes } from '../../selectors/network';
1313
import { edgesToCoords } from '../../selectors/canvas';
1414
import { entityAttributesProperty } from '../../utils/network-exporters/src/utils/reservedAttributes';
1515
import { get } from '../../utils/lodash-replacements';
16+
import { LayoutProvider } from '../../contexts/LayoutContext';
1617

1718
/**
1819
* Narrative Interface
@@ -150,59 +151,65 @@ class Narrative extends Component {
150151
return (
151152
<div className="narrative-interface">
152153
<div className="narrative-interface__canvas" id="narrative-interface__canvas">
153-
<Canvas
154-
className="narrative-concentric-circles"
155-
id="concentric-circles"
156-
key={`circles-${currentPreset.id}`}
154+
<LayoutProvider
155+
layout={layoutVariable}
156+
nodes={nodesWithLayout}
157+
edges={edgesWithCoords}
157158
>
158-
<Background
159-
concentricCircles={concentricCircles}
160-
skewedTowardCenter={skewedTowardCenter}
161-
image={backgroundImage}
162-
/>
163-
<ConvexHulls
164-
nodes={nodesWithLayout}
165-
groupVariable={convexHullVariable}
166-
layoutVariable={layoutVariable}
167-
/>
168-
<EdgeLayout
169-
edges={edgesWithCoords}
170-
/>
171-
{
172-
freeDraw && (
173-
<Annotations
174-
ref={this.annotationLayer}
175-
isFrozen={isFrozen}
176-
onChangeActiveAnnotations={this.handleChangeActiveAnnotations}
177-
/>
178-
)
179-
}
180-
<NodeLayout
181-
nodes={nodesWithLayout}
182-
id="NODE_LAYOUT"
183-
highlightAttribute={
184-
(showHighlightedNodes ? highlight[highlightIndex] : null)
159+
<Canvas
160+
className="narrative-concentric-circles"
161+
id="concentric-circles"
162+
key={`circles-${currentPreset.id}`}
163+
>
164+
<Background
165+
concentricCircles={concentricCircles}
166+
skewedTowardCenter={skewedTowardCenter}
167+
image={backgroundImage}
168+
/>
169+
<ConvexHulls
170+
nodes={nodesWithLayout}
171+
groupVariable={convexHullVariable}
172+
layoutVariable={layoutVariable}
173+
/>
174+
<EdgeLayout
175+
edges={edgesWithCoords}
176+
/>
177+
{
178+
freeDraw && (
179+
<Annotations
180+
ref={this.annotationLayer}
181+
isFrozen={isFrozen}
182+
onChangeActiveAnnotations={this.handleChangeActiveAnnotations}
183+
/>
184+
)
185185
}
186-
layoutVariable={layoutVariable}
187-
allowPositioning={allowRepositioning}
186+
<NodeLayout
187+
nodes={nodesWithLayout}
188+
id="NODE_LAYOUT"
189+
highlightAttribute={
190+
(showHighlightedNodes ? highlight[highlightIndex] : null)
191+
}
192+
layoutVariable={layoutVariable}
193+
allowPositioning={allowRepositioning}
194+
/>
195+
</Canvas>
196+
<PresetSwitcher
197+
id="drop-obstacle"
198+
presets={presets}
199+
activePreset={presetIndex}
200+
highlightIndex={highlightIndex}
201+
isFrozen={isFrozen}
202+
shouldShowResetButton={shouldShowResetButton}
203+
shouldShowFreezeButton={freeDraw}
204+
onResetInteractions={this.handleResetInteractions}
205+
onChangePreset={this.handleChangePreset}
206+
onToggleFreeze={this.handleToggleFreeze}
207+
onToggleHulls={this.handleToggleHulls}
208+
onToggleEdges={this.handleToggleEdges}
209+
onChangeHighlightIndex={this.handleChangeHighlightIndex}
210+
onToggleHighlighting={this.handleToggleHighlighting}
188211
/>
189-
</Canvas>
190-
<PresetSwitcher
191-
id="drop-obstacle"
192-
presets={presets}
193-
activePreset={presetIndex}
194-
highlightIndex={highlightIndex}
195-
isFrozen={isFrozen}
196-
shouldShowResetButton={shouldShowResetButton}
197-
shouldShowFreezeButton={freeDraw}
198-
onResetInteractions={this.handleResetInteractions}
199-
onChangePreset={this.handleChangePreset}
200-
onToggleFreeze={this.handleToggleFreeze}
201-
onToggleHulls={this.handleToggleHulls}
202-
onToggleEdges={this.handleToggleEdges}
203-
onChangeHighlightIndex={this.handleChangeHighlightIndex}
204-
onToggleHighlighting={this.handleToggleHighlighting}
205-
/>
212+
</LayoutProvider>
206213
</div>
207214
</div>
208215
);

src/containers/StartScreen/HeaderSection.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,10 @@ const HeaderSection = () => {
7171
<h2>Welcome to Interviewer!</h2>
7272
</header>
7373
<div className="welcome-description">
74-
<p>
75-
If this is your first time using Network Canvas Interviewer, please consider taking
76-
a moment to watch our overview video. It will introduce you to the key
77-
concepts of the Network Canvas project.
78-
</p>
7974
<p>
8075
For further detailed information, tutorials, videos, and information about
81-
collaboration, please visit our documentation website.
76+
collaboration, please visit our documentation website. For help and support,
77+
visit our community website.
8278
</p>
8379
<p>
8480
To get started right away, install one or more interview protocols
@@ -88,11 +84,11 @@ const HeaderSection = () => {
8884
</div>
8985
<div className="welcome-actions">
9086
<Button
91-
color="primary"
92-
onClick={() => openExternalLink('https://www.youtube.com/watch?v=XzfE6j-LnII')}
93-
disabled={!onlineStatus}
87+
className="button button--cerulean-blue button--with-new"
88+
color="cerulean-blue"
89+
onClick={() => openExternalLink('https://community.networkcanvas.com')}
9490
>
95-
Watch overview video
91+
Community Website
9692
</Button>
9793
<Button
9894
color="sea-serpent"
@@ -104,7 +100,7 @@ const HeaderSection = () => {
104100
<Button
105101
color="mustard"
106102
disabled={!onlineStatus}
107-
onClick={() => importProtocolFromURI('https://documentation.networkcanvas.com/protocols/Sample%20Protocol%20v3.netcanvas')}
103+
onClick={() => importProtocolFromURI('https://documentation.networkcanvas.com/protocols/Sample%20Protocol%20v4.netcanvas')}
108104
>
109105
Install sample protocol
110106
</Button>

src/ducks/modules/reset.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { entityPrimaryKeyProperty } from '@codaco/shared-consts';
22
import { actionCreators as sessionsActions } from './sessions';
33
import { actionCreators as deviceActions } from './deviceSettings';
44
import resetProtocolFiles from '../../utils/protocol/resetProtocolFiles';
5+
import { get } from '../../utils/lodash-replacements';
56

67
const RESET_STATE = 'RESET_STATE';
78
const RESET_EDGES_OF_TYPE = 'RESET/EDGES_OF_TYPE';
@@ -26,7 +27,8 @@ const resetPropertyForAllNodes = (property) => (dispatch, getState) => {
2627
} = getState();
2728

2829
nodes.forEach((node) => {
29-
const registryForType = nodeRegistry[node.type].variables;
30+
// Node definition may not have any variables
31+
const registryForType = get(nodeRegistry, [node.type, 'variables'], {});
3032

3133
if (registryForType[property]) {
3234
const variableType = registryForType[property].type;

src/selectors/canvas.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ const getDisplayEdges = (_, props) => get(props, 'prompt.edges.display', []);
2222
*
2323
* requires:
2424
* { layout, subject, sortOrder, stage } props
25+
*
26+
* Must *ALWAYS* return a node, or null.
2527
*/
2628
export const getNextUnplacedNode = createDeepEqualSelector(
2729
getNetworkNodes,
@@ -30,7 +32,8 @@ export const getNextUnplacedNode = createDeepEqualSelector(
3032
getSortOptions,
3133
getAllVariableUUIDsByEntity,
3234
(nodes, subject, layoutVariable, sortOptions, codebookVariables) => {
33-
if (nodes && nodes.length === 0) { return undefined; }
35+
if (nodes && nodes.length === 0) { return null; }
36+
if (!subject) { return null; }
3437

3538
// Stage subject is either a single object or a collection of objects
3639
const types = isArray(subject) ? subject.map((s) => s.type) : [subject.type];
@@ -66,13 +69,16 @@ export const getNextUnplacedNode = createDeepEqualSelector(
6669
*
6770
* requires:
6871
* { layout, subject } props
72+
*
73+
* Must *ALWAYS* return an array, even if empty.
6974
*/
7075
export const getPlacedNodes = createDeepEqualSelector(
7176
getNetworkNodes,
7277
getStageSubject(),
7378
getLayout,
7479
(nodes, subject, layoutVariable) => {
75-
if (nodes && nodes.length === 0) { return undefined; }
80+
if (nodes && nodes.length === 0) { return []; }
81+
if (!subject) { return []; }
7682

7783
// Stage subject is either a single object or a collecton of objects
7884
const types = isArray(subject) ? subject.map((s) => s.type) : [subject.type];

src/styles/components/_information-interface.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$asset-size-large: 64vh;
22
$asset-size-medium: 32vh;
3-
$asset-size-small: 16vh;
4-
$asset-size-default: 16vh;
3+
$asset-size-small: 17vh;
4+
$asset-size-default: 17vh;
55

66
.information-interface {
77
@include interface-centering;
@@ -12,8 +12,7 @@ $asset-size-default: 16vh;
1212
align-items: center;
1313

1414
&__frame {
15-
width: 80%;
16-
max-width: 50rem;
15+
max-width: 55rem;
1716
}
1817

1918
&__title {
@@ -22,7 +21,7 @@ $asset-size-default: 16vh;
2221

2322
&__items {
2423
margin-top: spacing('large');
25-
max-height: calc($asset-size-large + #{spacing('medium') * 4});
24+
max-height: calc(#{$asset-size-large} + #{spacing('medium') * 4});
2625
overflow: hidden;
2726
}
2827

@@ -63,6 +62,7 @@ $asset-size-default: 16vh;
6362
overflow-y: auto;
6463
height: auto;
6564
max-height: $asset-size-small;
65+
margin-top: 0; // Text paragraphs have their own margin
6666

6767
&.information-interface__item--size-SMALL {
6868
max-height: $asset-size-small;

src/styles/components/_node-form.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
.overlay__content {
1212
.scrollable {
13-
padding: unit(2) unit(4);
13+
padding: 0 unit(4);
1414
}
1515
}
1616
}

0 commit comments

Comments
 (0)