Skip to content

Commit

Permalink
Removing FigurePanel support which was only requested by SourceData.
Browse files Browse the repository at this point in the history
There was otherwise no consensus in this regard.
  • Loading branch information
obuchtala committed Oct 10, 2019
1 parent acad8ee commit 7ffc5b4
Show file tree
Hide file tree
Showing 60 changed files with 215 additions and 4,020 deletions.
10 changes: 1 addition & 9 deletions builds/desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ const {
const DEBUG = process.env.DEBUG

const BLANK_DOCUMENT = path.join(__dirname, 'templates', 'blank.dar')
const BLANK_FIGURE_PACKAGE = path.join(__dirname, 'templates', 'blank-figure-package.dar')
const templates = {
'article': BLANK_DOCUMENT,
'figure-package': BLANK_FIGURE_PACKAGE
'article': BLANK_DOCUMENT
}

let argv = process.argv
Expand Down Expand Up @@ -282,12 +280,6 @@ function _createMenu () {
click () {
_openNew('article')
}
},
{
label: 'Figure Package',
click () {
_openNew('figure-package')
}
}
]
},
Expand Down
45 changes: 0 additions & 45 deletions data/blank-figure-package/figure.xml

This file was deleted.

8 changes: 0 additions & 8 deletions data/blank-figure-package/manifest.xml

This file was deleted.

Binary file removed data/blank-figure-package/placeholder.png
Binary file not shown.
Binary file removed data/elife-32671/fig1.jpg
Binary file not shown.
Binary file removed data/elife-32671/fig2.jpg
Binary file not shown.
Binary file removed data/elife-32671/fig3.jpg
Binary file not shown.
Binary file removed data/elife-32671/fig4.jpg
Binary file not shown.
Binary file removed data/elife-32671/fig5.jpg
Binary file not shown.
12 changes: 0 additions & 12 deletions data/elife-32671/manifest.xml

This file was deleted.

1,940 changes: 0 additions & 1,940 deletions data/elife-32671/manuscript.xml

This file was deleted.

Empty file.
Binary file removed data/figure-package/fig1a.jpg
Binary file not shown.
Binary file removed data/figure-package/fig1b.jpg
Binary file not shown.
142 changes: 0 additions & 142 deletions data/figure-package/figure.xml

This file was deleted.

10 changes: 0 additions & 10 deletions data/figure-package/manifest.xml

This file was deleted.

39 changes: 6 additions & 33 deletions data/kitchen-sink/manuscript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -322,42 +322,15 @@ def read() = in.read()
</permissions>
</fig>
<p id="p-4">Lorem ipsum.</p>
<fig-group id="fig2">
<fig id="fig2a">
<label>Figure 2A</label>
<caption>
<title>First panel</title>
<p id="fig2a-caption-p1">First panel legend</p>
</caption>
<graphic id="fig2a-graphic" mimetype="image" mime-subtype="jpeg" xlink:href="fig2.jpg" />
</fig>
<fig id="fig2b">
<label>Figure 2B</label>
<caption>
<title>Second panel</title>
<p id="fig2b-caption-p1">Second panel caption</p>
</caption>
<graphic id="fig2b-graphic" mimetype="image" mime-subtype="jpeg" xlink:href="fig1.jpg" />
</fig>
</fig-group>
<p id="p-5">abc</p>
<fig id="fig3">
<label>Figure 3</label>
<fig id="fig2">
<label>Figure 2</label>
<caption>
<title>Figure with metadata.</title>
<p id="fig3-caption-p1">Legend.</p>
<title>First panel</title>
<p id="fig2-caption-p1">First panel legend</p>
</caption>
<kwd-group>
<label>Field I</label>
<kwd>Value A</kwd>
<kwd>Value B</kwd>
</kwd-group>
<kwd-group>
<label>Field II</label>
<kwd>Value C</kwd>
</kwd-group>
<graphic id="fig3-graphic-1" mimetype="image" mime-subtype="jpeg" xlink:href="placeholder.jpg" />
<graphic id="fig2-graphic" mimetype="image" mime-subtype="jpeg" xlink:href="fig2.jpg" />
</fig>
<p id="p-5">abc</p>
</sec>
<sec id="sec-3-3">
<title>Supplementary Files</title>
Expand Down
26 changes: 6 additions & 20 deletions docs/TextureJATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ id, xml:base, specific-use
</pre>
**Contains**:
<pre style="white-space:pre-wrap;">
(sec|boxed-text|chem-struct-wrap|fig|fig-group|table-wrap|disp-formula|disp-formula-group|def-list|list|p|preformat|disp-quote|supplementary-material|disp-formula|disp-formula-group|def-list|list|p|ack|disp-quote|speech|statement|verse-group)*
(sec|boxed-text|chem-struct-wrap|fig|table-wrap|disp-formula|disp-formula-group|def-list|list|p|preformat|disp-quote|supplementary-material|disp-formula|disp-formula-group|def-list|list|p|ack|disp-quote|speech|statement|verse-group)*
</pre>
**This element may be contained in:**
<pre style="white-space:pre-wrap;">
Expand Down Expand Up @@ -698,22 +698,7 @@ id, xml:base, position, orientation, specific-use, xml:lang, fig-type
</pre>
**Contains**:
<pre style="white-space:pre-wrap;">
object-id?,label?,caption?,kwd-group*,graphic,permissions?
</pre>
**This element may be contained in:**
<pre style="white-space:pre-wrap;">
fig-group, named-content, sec, body
</pre>

### `<fig-group>`

**Attributes**:
<pre style="white-space:pre-wrap;">
id, xml:base, position, orientation, specific-use, xml:lang, content-type
</pre>
**Contains**:
<pre style="white-space:pre-wrap;">
label?,fig+
object-id?,label?,caption?,graphic,permissions?
</pre>
**This element may be contained in:**
<pre style="white-space:pre-wrap;">
Expand Down Expand Up @@ -1032,7 +1017,7 @@ label?,kwd*
</pre>
**This element may be contained in:**
<pre style="white-space:pre-wrap;">
article-meta, fig
article-meta
</pre>

### `<label>`
Expand All @@ -1047,7 +1032,7 @@ id, xml:base, alt, xml:lang
</pre>
**This element may be contained in:**
<pre style="white-space:pre-wrap;">
aff, kwd-group, fn-group, fig-group, fig, supplementary-material, table-wrap, fn, disp-formula
aff, kwd-group, fn-group, fig, supplementary-material, table-wrap, fn, disp-formula
</pre>

### `<license>`
Expand Down Expand Up @@ -1538,7 +1523,7 @@ id, xml:base, xml:lang, sec-type, disp-level, specific-use
</pre>
**Contains**:
<pre style="white-space:pre-wrap;">
title?,(boxed-text|chem-struct-wrap|fig|fig-group|table-wrap|disp-formula|disp-formula-group|def-list|list|p|preformat|disp-quote|supplementary-material|disp-formula|disp-formula-group|def-list|list|p|ack|disp-quote|speech|statement|verse-group)*,sec*
title?,(boxed-text|chem-struct-wrap|fig|table-wrap|disp-formula|disp-formula-group|def-list|list|p|preformat|disp-quote|supplementary-material|disp-formula|disp-formula-group|def-list|list|p|ack|disp-quote|speech|statement|verse-group)*,sec*
</pre>
**This element may be contained in:**
<pre style="white-space:pre-wrap;">
Expand Down Expand Up @@ -2116,6 +2101,7 @@ element-citation, date, pub-date
- equation-count
- etal
- fig-count
- fig-group
- floats-group
- front-stub
- funding-statement
Expand Down
1 change: 0 additions & 1 deletion make.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ b.task('build:desktop', ['build:desktop:dars'], () => {
b.task('build:desktop:dars', () => {
// templates
_packDar('data/blank', APPDIST + 'templates/blank.dar')
_packDar('data/blank-figure-package', APPDIST + 'templates/blank-figure-package.dar')
// examples
_packDar('data/elife-32671', APPDIST + 'examples/elife-32671.dar')
_packDar('data/kitchen-sink', APPDIST + 'examples/kitchen-sink.dar')
Expand Down
6 changes: 0 additions & 6 deletions src/article/ArticlePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component, $$, platform } from 'substance'
import { AppState, createComponentContext } from '../kit'
import DefaultSettings from './settings/DefaultSettings'
import EditorSettings from './settings/ExperimentalEditorSettings'
import FigurePackageSettings from './settings/FigurePackageSettings'
import ArticleAPI from './api/ArticleAPI'
import ArticleEditorSession from './api/ArticleEditorSession'

Expand Down Expand Up @@ -164,13 +163,8 @@ export default class ArticlePanel extends Component {
// On the long run we need to understand better what different means of configuration we want to offer
_createSettings (doc) {
let settings = new EditorSettings()
let metadata = doc.get('metadata')
// Default settings
settings.load(DefaultSettings)
// Article type specific settings
if (metadata.articleType === 'figure-package') {
settings.extend(FigurePackageSettings)
}
return settings
}

Expand Down
Loading

0 comments on commit 7ffc5b4

Please sign in to comment.