Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
718e957
updates bulkexport script to batch exports
gabestein Jul 11, 2024
6d3d1a0
add back jats
gabestein Jul 11, 2024
7ac5c98
fix race condition that resulted in no final download
gabestein Sep 10, 2024
fa081c0
still not perfect but better
gabestein Sep 20, 2024
31a8af9
update: Langing page for Platform (#3129)
gabestein Jul 17, 2024
3245366
debounce user query and prevent null (#3133)
gabestein Aug 1, 2024
66c432f
debounce collection search (#3136)
gabestein Aug 6, 2024
3538520
dev: Remove TOS banner (#3176)
gabestein Sep 25, 2024
3a8fcca
use preprint for arcadia (#3173)
gabestein Sep 25, 2024
ee833d8
use timestamp for crossref deposits (#3199)
gabestein Nov 25, 2024
1814a82
feat: add code attrs such as lang to statically rendered html code bl…
tefkah Dec 16, 2024
57c2d6a
don't strip iframe url if target is html (#3207)
gabestein Dec 19, 2024
f8ba23f
return public comments from querymany if pub has release (#3209)
gabestein Dec 21, 2024
bd07e03
fix: reerse ordering of wrapped marks in static export (#3221)
isTravis Jan 21, 2025
f10a1e5
add redirects (#3228)
gabestein Feb 13, 2025
aab05e8
update: Add hideLabel value to output HTML (#3227)
isTravis Feb 13, 2025
93e54ac
chore: upgrade heroku stack (#3235)
3mcd Feb 19, 2025
9a056cf
feat: add read replicas (#3236)
tefkah Feb 25, 2025
1205cc2
fix: make scopesummaries always use master (#3249)
tefkah Mar 3, 2025
7125ba5
fix: fix many read replica issues (#3251)
tefkah Mar 4, 2025
87db0ef
Attempt to add the browse page link to eLife navigation (#3258)
erkannt Mar 11, 2025
16da02a
use pipelines to make sure you get all the files
gabestein Apr 1, 2025
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
1 change: 0 additions & 1 deletion Aptfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ xsltproc

# poppler-utils contains pdftoppm, which we use to import PDF graphics as web-friendy images

:repo:deb http://cz.archive.ubuntu.com/ubuntu bionic main universe
poppler-utils

# imagemagick is used to convert other images to web-friendly formats
Expand Down
1 change: 1 addition & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"addons": ["cloudamqp:lemur"],
"stack": "heroku-24",
"buildpacks": [
{ "url": "https://github.com/heroku/heroku-buildpack-apt.git" },
{ "url": "heroku/nodejs" }
Expand Down
2 changes: 2 additions & 0 deletions client/components/Editor/schemas/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default {
size: Number(node.getAttribute('data-size')) || 50,
align: node.getAttribute('data-align') || 'center',
caption: node.firstChild.getAttribute('alt') || '',
hideLabel: node.getAttribute('data-hide-label') || '',
};
},
},
Expand All @@ -49,6 +50,7 @@ export default {
'data-node-type': 'audio',
'data-size': node.attrs.size,
'data-align': node.attrs.align,
'data-hide-label': node.attrs.hideLabel,
},
[
'audio',
Expand Down
12 changes: 10 additions & 2 deletions client/components/Editor/schemas/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@ const renderStaticCode = (node: Node): DOMOutputSpec => {
if (parser) {
const tree = parser.parse(node.textContent);
const children = fromLezer(node.textContent, tree as unknown as Tree);
return ['pre', ['code', ...children]] as DOMOutputSpec;
return [
'pre',
{ id: node.attrs.id, 'data-lang': node.attrs.lang },
['code', ...children],
] as DOMOutputSpec;
}
return ['pre', ['code', node.textContent]] as DOMOutputSpec;
return [
'pre',
{ id: node.attrs.id, ...(node.attrs.lang && { 'data-lang': node.attrs.lang }) },
['code', node.textContent],
] as DOMOutputSpec;
};

const codeSchema: { [key: string]: NodeSpec } = {
Expand Down
2 changes: 2 additions & 0 deletions client/components/Editor/schemas/iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default {
height: Number(node.firstChild.getAttribute('height')) || 419,
align: node.getAttribute('data-align') || 'center',
caption: node.firstChild.getAttribute('alt') || '',
hideLabel: node.getAttribute('data-hide-label') || '',
};
},
},
Expand All @@ -51,6 +52,7 @@ export default {
'data-node-type': 'iframe',
'data-size': node.attrs.size,
'data-align': node.attrs.align,
'data-hide-label': node.attrs.hideLabel,
},
[
'iframe',
Expand Down
5 changes: 4 additions & 1 deletion client/components/Editor/schemas/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ export default {
size: Number(node.getAttribute('data-size')) || 50,
align: node.getAttribute('data-align') || 'center',
altText: node.getAttribute('data-alt-text') || '',
hideLabel: node.getAttribute('data-hide-label') || '',
href: node.getAttribute('data-href') || null,
};
},
},
],
toDOM: (node, { isStaticallyRendered } = { isStaticallyRendered: false }) => {
const { url, align, id, altText, caption, fullResolution, size, href } = node.attrs;
const { url, align, id, altText, caption, fullResolution, size, hideLabel, href } =
node.attrs;

const width = align === 'breakout' ? 1920 : 800;
const isResizeable = isResizeableFormat(url) && !fullResolution;
Expand Down Expand Up @@ -92,6 +94,7 @@ export default {
'data-caption': caption,
'data-href': href,
'data-alt-text': altText,
'data-hide-label': hideLabel,
},
href
? [
Expand Down
2 changes: 2 additions & 0 deletions client/components/Editor/schemas/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default {
align: node.getAttribute('data-align') || 'center',
caption: node.firstChild.getAttribute('alt') || '',
loop: !!node.firstChild.getAttribute('loop'),
hideLabel: node.getAttribute('data-hide-label') || '',
};
},
},
Expand All @@ -52,6 +53,7 @@ export default {
'data-node-type': 'video',
'data-size': node.attrs.size,
'data-align': node.attrs.align,
'data-hide-label': node.attrs.hideLabel,
},
[
'video',
Expand Down
2 changes: 1 addition & 1 deletion client/components/Editor/utils/renderStatic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const fillHoleInSpec = (outputSpec, children, isMark) => {
};

const wrapOutputSpecInMarks = (outputSpec, marks, schema) => {
return marks.reduce((child, mark) => {
return [...marks].reverse().reduce((child, mark) => {
const { spec: markSpec } = schema.marks[mark.type];
return fillHoleInSpec(markSpec.toDOM(mark), [child], true);
}, outputSpec);
Expand Down
15 changes: 5 additions & 10 deletions client/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const defaultProps = {
type Props = OwnProps & typeof defaultProps;

const basePubPubFooterLinks = [
{ id: '1', title: 'Create your community', href: '/community/create' },
{ id: '2', title: 'Login', href: '/login' },
{ id: '3', title: 'Signup', href: '/signup' },
{ id: '4', title: 'Legal', href: '/legal' },
Expand Down Expand Up @@ -143,21 +142,17 @@ const Footer = (props: Props) => {
</ul>
</div>
<ul className="separated">
<li>
<a href="https://pubpub.org/about">About</a>
</li>
<li>
<a href="https://pubpub.org/explore">Explore</a>
</li>
<li>
<a href="https://pubpub.org/pricing">Pricing</a>
</li>
<li>
<a href="https://help.pubpub.org">Help</a>
</li>
<li>
<a href="https://github.com/pubpub/pubpub/discussions">Forum</a>
</li>
<li>
<a href="https://www.knowledgefutures.org/pubpub/">
Learn about the new PubPub Platform
</a>
</li>
</ul>

<form onSubmit={handleEmailSubmit}>
Expand Down
7 changes: 4 additions & 3 deletions client/components/GlobalControls/GlobalControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ const GlobalControls = (props: Props) => {
if (isBasePubPub) {
return (
<>
<GlobalControlsButton href="/explore" mobileOrDesktop={{ text: 'Explore' }} />
<GlobalControlsButton href="/pricing" mobileOrDesktop={{ text: 'Pricing' }} />
<GlobalControlsButton href="/about" mobileOrDesktop={{ text: 'About' }} />
<GlobalControlsButton
href="https://www.knowledgefutures.org/pubpub/"
mobileOrDesktop={{ text: 'PubPub Platform (new!)' }}
/>
{renderSearch()}
</>
);
Expand Down
21 changes: 13 additions & 8 deletions client/components/UserAutocomplete/UserAutocomplete.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Classes, MenuItem, Position } from '@blueprintjs/core';
import { Suggest } from '@blueprintjs/select';

import debounce from 'debounce';
import { Avatar } from 'components';
import { apiFetch } from 'client/utils/apiFetch';

Expand All @@ -28,26 +28,31 @@ type Props = OwnProps & typeof defaultProps;
class UserAutocomplete extends Component<Props, State> {
static defaultProps = defaultProps;

runUserQuery = (queryValue) => {
apiFetch(`/api/search/users?q=${queryValue}`).then((result) => {
const { usedUserIds } = this.props;
this.setState({
items: result.filter((item) => !usedUserIds.includes(item.id)),
});
});
};

constructor(props: Props) {
super(props);
this.state = {
items: [],
queryValue: '',
};
this.runUserQuery = debounce(this.runUserQuery, 300);
// @ts-expect-error ts-migrate(2339) FIXME: Property 'inputRef' does not exist on type 'UserAu... Remove this comment to see the full error message
this.inputRef = undefined;
this.handleSelect = this.handleSelect.bind(this);
}

componentDidUpdate(_: Props, prevState: State) {
const { queryValue } = this.state;
if (queryValue !== prevState.queryValue) {
apiFetch(`/api/search/users?q=${queryValue}`).then((result) => {
const { usedUserIds } = this.props;
this.setState({
items: result.filter((item) => !usedUserIds.includes(item.id)),
});
});
if (queryValue !== prevState.queryValue && queryValue !== '') {
this.runUserQuery(queryValue);
}
}

Expand Down
4 changes: 0 additions & 4 deletions client/containers/About/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ const About = function () {
from drafting documents, conducting peer review, and hosting entire journal and
book websites to collecting and displaying reader feedback and analytics.
</p>
<p>
You can get started now by{' '}
<a href="/community/create">creating your community</a>.
</p>
<h2>Features, Benefits, and Tradeoffs</h2>
<p>
PubPub is an open-source, hosted, free-to-use content management system designed
Expand Down
26 changes: 6 additions & 20 deletions client/containers/CommunityCreate/CommunityCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,16 @@ const CommunityCreate = () => {
<div>
<h1>Create Community</h1>
<p>
PubPub and all its features are free to use.<sup>*</sup> If you value
PubPub, we ask you to consider supporting our work by becoming a member
of the Knowledge Futures Group.{' '}
PubPub is evolving, and we are currently only allowing new community
creation for existing users with an explicit short-term need. Learn more
by reading our announcement. If you are an existing user who needs to
create a community, please{' '}
<a
href="https://knowledgefutures.org/membership"
href="mailto:partnerships@knowledgefutures.org?mailto=PubPub%20Legacy%20Community"
target="_blank"
rel="noreferrer"
>
Learn more
get in touch
</a>
.
</p>
Expand Down Expand Up @@ -178,21 +179,6 @@ const CommunityCreate = () => {
/>
</InputField>
</form>
<p>
<sup>*</sup> We limit DOI registrations to 10 per community per year, if
published via PubPub's Crossref membership. Once the limit is reached,
we ask that you become a{' '}
<a
href="https://knowledgefutures.org/membership"
target="_blank"
rel="noreferrer"
>
KFG member
</a>
, at any level, and allow us to pass on the Crossref fee of $1 per DOI
registered. For groups with their own Crossref membership, there is no
additional fee for creating or depositing DOIs.
</p>
</div>
)}
</GridWrapper>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState } from 'react';
import { useDebounce } from 'use-debounce';

import { PubMenuItem, QueryListDropdown } from 'components';
import { PubWithCollections } from 'types';
Expand All @@ -16,14 +17,15 @@ type Props = {
const PubSelect = (props: Props) => {
const { children, onSelectPub, collectionId, usedPubIds } = props;
const [searchTerm, setSearchTerm] = useState('');
const [debouncedSearchTerm] = useDebounce(searchTerm, 200);

const {
allQueries: { isLoading },
currentQuery: { pubs },
} = useManyPubs<PubWithCollections>({
batchSize: 50,
query: {
term: searchTerm,
term: debouncedSearchTerm,
excludeCollectionIds: [collectionId],
ordering: { field: 'updatedDate', direction: 'DESC' },
},
Expand Down
11 changes: 4 additions & 7 deletions client/containers/Explore/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ const Explore = (props: Props) => {
<div className="col-12">
<h1>Explore communities</h1>
<div className="details">
PubPub hosts over 3,000 communities, with more added every day! Anyone
can <a href="/community/create">create</a> a free PubPub community at
any time; all you need is an account and some very basic community
details. Below are 40 PubPub communities that we think form a good
snapshot of what you can create with PubPub's spaces and features. We
hope they provide inspiration for your own spaces, designs, and
workflows.
PubPub hosts over 3,000 communities, with more added every day! Below
are 40 PubPub communities that we think form a good snapshot of what you
can create with PubPub's spaces and features. We hope they provide
inspiration for your own spaces, designs, and workflows.
</div>
</div>

Expand Down
Loading