Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
2be2d28
Add homepage
thewilkybarkid Mar 19, 2019
2350dfc
Not there anymore
thewilkybarkid Mar 19, 2019
75b044d
Update existing tests
thewilkybarkid Mar 19, 2019
ab67c94
Use specific exception
thewilkybarkid Mar 19, 2019
17a3b37
Merge branch 'master' into homepage
thewilkybarkid Mar 22, 2019
2a92d14
Merge fixes
thewilkybarkid Mar 22, 2019
ace03ab
Set HTML title using translations
thewilkybarkid Mar 22, 2019
3f35854
Add homepage to integration tests
thewilkybarkid Mar 22, 2019
087a021
Fix and test title
thewilkybarkid Mar 22, 2019
24045d5
Merge branch 'master' into homepage
thewilkybarkid Mar 28, 2019
7222c0c
Extract PageEvent
thewilkybarkid Mar 28, 2019
4ebe45f
Merge branch 'master' into homepage
thewilkybarkid Mar 28, 2019
9b8a204
Missed some cases
thewilkybarkid Mar 28, 2019
572d5c3
Merge branch 'master' into homepage
thewilkybarkid Mar 28, 2019
737ff95
Return type
thewilkybarkid Mar 29, 2019
9880898
Tweak configuration
thewilkybarkid Mar 29, 2019
1bc13dc
Improve name
thewilkybarkid Mar 29, 2019
f125fbb
Changes
thewilkybarkid Mar 29, 2019
9c244af
Merge branch 'master' into homepage-lazy
thewilkybarkid Mar 29, 2019
06b0ce8
Merge branch 'master' of github.com:libero/browser into thewilkybarki…
nlisgo Apr 2, 2019
e658709
Introduce pattern library teaser templates
nlisgo Apr 2, 2019
ee06b3f
Introduce teaser pattern
nlisgo Apr 2, 2019
95516a4
Note to set route to content
nlisgo Apr 2, 2019
d8a1bb2
Adjust arguments handled
nlisgo Apr 2, 2019
84a4228
Use teaser-list template
nlisgo Apr 3, 2019
029a201
cs
nlisgo Apr 3, 2019
91d628b
Update vendor-extra/LiberoPageBundle/src/EventListener/BuildView/Item…
thewilkybarkid Apr 3, 2019
137582f
Add in paths
thewilkybarkid Apr 3, 2019
d65a080
Merge branch 'master' into homepage-lazy—teaser
thewilkybarkid Apr 3, 2019
abba688
Make canHandleTemplate parameter optional
nlisgo Apr 4, 2019
ef374e7
Get teaser list working
nlisgo Apr 4, 2019
8844a0e
Merge branch 'homepage-lazy—teaser-new' of github.com:nlisgo/libero-b…
nlisgo Apr 4, 2019
8bbaabc
Re-introduce lazy view
nlisgo Apr 5, 2019
1a0c5fa
cs
nlisgo Apr 5, 2019
b67c520
cs
nlisgo Apr 5, 2019
2666132
Pass only front for teaser listeners in JatsContentBundle
nlisgo Apr 5, 2019
942b30e
Add tests for FrontArticleTitleTeaserListener
nlisgo Apr 5, 2019
57280e9
Add tests for ItemTeaserListener
nlisgo Apr 5, 2019
b8bb328
Merge branch 'master' into homepage-lazy—teaser
thewilkybarkid Apr 8, 2019
6fa6615
Update homepage test and support Libero content
thewilkybarkid Apr 8, 2019
abd30d3
Fix list and add test
thewilkybarkid Apr 8, 2019
922cf53
Add tests
thewilkybarkid Apr 9, 2019
30d382d
Update config
thewilkybarkid Apr 9, 2019
f3b6e6c
Tidy
thewilkybarkid Apr 9, 2019
7c2310e
Not needed here
thewilkybarkid Apr 9, 2019
0cdb625
Add title
thewilkybarkid Apr 9, 2019
b7ee7af
Merge branch 'master' into homepage-lazy—teaser
thewilkybarkid Apr 9, 2019
5868bdb
Set levels
thewilkybarkid Apr 9, 2019
39edf12
Put in grid and fix levels
thewilkybarkid Apr 9, 2019
61e5820
Set empty text
thewilkybarkid Apr 9, 2019
10177c5
Update
thewilkybarkid Apr 9, 2019
3bb1391
Update
thewilkybarkid Apr 9, 2019
56ec635
Fix terminology
thewilkybarkid Apr 9, 2019
c3d74a4
Simplify
thewilkybarkid Apr 9, 2019
63f41a0
Split into three
thewilkybarkid Apr 9, 2019
9605f3e
Missing assertion
thewilkybarkid Apr 9, 2019
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: 1 addition & 0 deletions .docker/api/data/blog-articles/post1/1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta>

<id>post1</id>
<service>blog-articles</service>

</meta>

Expand Down
1 change: 1 addition & 0 deletions .docker/api/data/scholarly-articles/article1/1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta>

<id>article1</id>
<service>scholarly-articles</service>

</meta>

Expand Down
153 changes: 153 additions & 0 deletions .docker/api/data/scholarly-articles/article2/1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>

<item xmlns="http://libero.pub" xmlns:jats="http://jats.nlm.nih.gov">

<meta>

<id>article2</id>
<service>scholarly-articles</service>

</meta>

<jats:article>

<jats:front>

<jats:article-meta>

<jats:title-group>

<jats:article-title>
Article 2 y'all
</jats:article-title>

</jats:title-group>

<jats:article-categories>
<jats:subj-group subj-group-type="heading">
<jats:subject>Evolutionary Biology</jats:subject>
</jats:subj-group>
</jats:article-categories>

<jats:kwd-group kwd-group-type="author-keywords">
<jats:kwd>XML</jats:kwd>
<jats:kwd>Housestyle</jats:kwd>
<jats:kwd>eLife</jats:kwd>
<jats:kwd><jats:italic>formatting</jats:italic></jats:kwd>
</jats:kwd-group>

<jats:kwd-group kwd-group-type="research-organism">
<jats:title>Research organism</jats:title>
<jats:kwd>Human</jats:kwd>
<jats:kwd>Machine</jats:kwd>
</jats:kwd-group>

</jats:article-meta>

</jats:front>

<jats:body>

<jats:sec>

<jats:title>Introduction</jats:title>

<jats:p>Fossil hominins were first recognized in the Dinaledi Chamber in the Rising Star cave system in
October 2013. During a relatively short excavation, our team recovered an extensive collection of
1550 hominin specimens, representing nearly every element of the skeleton multiple times (Figure
1), including many complete elements and morphologically informative fragments, some in
articulation, as well as smaller fragments many of which could be refit into more complete
elements. The collection is a morphologically homogeneous sample that can be attributed to no
previously-known hominin species. Here we describe this new species, <jats:italic>Homo
naledi</jats:italic>. We have not defined <jats:italic>H. naledi</jats:italic> narrowly based on a
single jaw or skull because the entire body of material has informed our understanding of its
biology.
</jats:p>

<jats:p>Order Primates LINNAEUS 1758</jats:p>

<jats:p>Suborder Anthropoidea MIVART 1864</jats:p>

<jats:p>Superfamily Hominoidea GRAY 1825</jats:p>

<jats:p>Family Hominidae GRAY 1825</jats:p>

<jats:p>Tribe Hominini GRAY 1825</jats:p>

<jats:p>Genus <jats:italic>Homo</jats:italic> LINNAEUS 1758</jats:p>

<jats:p><jats:italic>Homo naledi</jats:italic> sp. nov.
urn:lsid:zoobank.org:pub:00D1E81A-6E08-4A01-BD98-79A2CEAE2411
</jats:p>

<jats:sec>

<jats:title>Etymology</jats:title>

<jats:p>The word <jats:italic>naledi</jats:italic> means ‘star’ in the Sotho language and refers to
the Dinaledi Chamber's location within the Rising Star cave system.
</jats:p>

</jats:sec>

<jats:sec>

<jats:title>Locality</jats:title>

<jats:p>The Dinaledi chamber is located approximately 30 meters underground, within the Rising Star
cave system at about 26°1′13′′ S; 27°42′43′′ E. The system lies within the Malmani dolomites,
approximately 800 meters southwest of the well-known site of Swartkrans in the Cradle of
Humankind World Heritage Site, Gauteng Province, South Africa.
</jats:p>

</jats:sec>

<jats:sec>

<jats:title>Horizon and associations</jats:title>

<jats:p>The present sample of skeletal material from the Dinaledi Chamber was recovered during two
field expeditions, in November 2013 and March 2014.
</jats:p>

<jats:p>Six specimens from an ex situ context can be identified as bird bones, and few fragmentary
rodent remains have been recovered within the excavation area. Neither of these faunal
constituents can presently be associated with the hominin fossil collection (Dirks et al.,
2015).
</jats:p>

<jats:p>Aside from these limited faunal materials, the Dinaledi collection is entirely composed of
hominin skeletal and dental remains. The collection so far comprises 1550 fossil hominin
specimens, this number includes 1413 bone specimens and 137 isolated dental specimens; an
additional 53 teeth are present in mandibular or maxillary bone specimens. Aside from the
fragmentary rodent teeth, all dental crowns (n = 179) are hominin, recovered both from surface
collection and excavation. Likewise, aside from the few bird elements, all morphologically
informative bone specimens are clearly hominin. In all cases where elements are repeated in the
sample, they are morphologically homogeneous, with variation consistent with body size and sex
differences within a single population. These remains represent a minimum of 15 hominin
individuals, as indicated by the repetition and presence of deciduous and adult dental
elements.
</jats:p>

<jats:p>The geological age of the fossils is not yet known. Excavations have thus far recovered
hominin material from Unit 2 and Unit 3 in the chamber (Dirks et al., 2015). Surface-collected
hominin material from the present top of Unit 3, which includes material derived from both Unit
2 and Unit 3, represents a minority of the assemblage, and is morphologically indistinguishable
from material excavated from in situ within Unit 3. In addition to general morphological
homogeneity including cranial shape, distinctive morphological configurations of all the
recovered first metacarpals, femora, molars, lower premolars and lower canines, are identical
in both surface-collected and excavated specimens (see Figure 14 later in the text). These
include traits not found in any other hominin species yet described. These considerations
strongly indicate that this material represents a single species, and not a commingled
assemblage.
</jats:p>

</jats:sec>

</jats:sec>

</jats:body>

</jats:article>

</item>
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
},
"require-dev": {
"csa/guzzle-cache-middleware": "^1.0",
"dusank/knapsack": "^10.0",
"libero/coding-standard": "^0.4",
"php-vfs/php-vfs": "^1.4",
"phpstan/phpstan": "^0.11",
Expand Down
60 changes: 59 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/packages/dev/libero_page.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ libero_page:
pages:
homepage:
path: '/'
search_service: 'scholarly-articles'
Copy link
Copy Markdown
Contributor

@thewilkybarkid thewilkybarkid Apr 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Been thinking about how to power the list on the homepage. eLife uses its search service, which is where our initial direction has been here. But that has been a bit problematic as it's not then easy for us to turn off search if needed (it'd be good to have a circuit breaker there). For Libero though, this needs to be a list of items. As it stands, the content API and search API lists are the same so can be interchanged (scholarly-articles is actually the name of a content service). Search will be expanded to allow filtering by type etc. If we are able to keep the basic definition of how lists work the same, then it's possible to use other things here (eg could be a dedicated list). Means the config here would be a path, as opposed to the name of a service. (To use a search service, would be the path include any query string parameters, which as it stands has to be configured somewhere else.)

/cc @giorgiosironi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 30d382d. There's already a mismatch in the dervied paths (a search service would be just /{service-name}, whereas as content API is /{service-name}/items).

content:
blog-articles:
path: '/blog/{id}'
Expand Down
1 change: 1 addition & 0 deletions config/packages/test/libero_page.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ libero_page:
pages:
homepage:
path: '/'
search_service: 'search'
content:
blog-articles:
path: '/blog/{id}'
Expand Down
18 changes: 3 additions & 15 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,15 @@
<testsuite name="Browser">
<directory suffix=".php">tests</directory>
</testsuite>
<testsuite name="ContentPageBundle">
<directory suffix=".php">vendor-extra/ContentPageBundle/tests</directory>
</testsuite>
<testsuite name="JatsContentBundle">
<directory suffix=".php">vendor-extra/JatsContentBundle/tests</directory>
</testsuite>
<testsuite name="LiberoContentBundle">
<directory suffix=".php">vendor-extra/LiberoContentBundle/tests</directory>
</testsuite>
<testsuite name="ViewsBundle">
<directory suffix=".php">vendor-extra/ViewsBundle/tests</directory>
<testsuite name="VendorExtra">
<directory suffix=".php">vendor-extra/*/tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>src</directory>
<directory>vendor-extra/ContentPageBundle/src</directory>
<directory>vendor-extra/JatsContentBundle/src</directory>
<directory>vendor-extra/LiberoContentBundle/src</directory>
<directory>vendor-extra/ViewsBundle/src</directory>
<directory>vendor-extra/*/src</directory>
</whitelist>
</filter>

Expand Down
3 changes: 3 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"doctrine/instantiator": {
"version": "1.1.0"
},
"dusank/knapsack": {
"version": "10.0.0"
},
"fluentdom/fluentdom": {
"version": "7.1.0"
},
Expand Down
54 changes: 52 additions & 2 deletions tests/WebTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,56 @@ public function it_has_a_homepage() : void
{
$client = static::createClient();

self::mockApiResponse(
new Request(
'GET',
'http://localhost/search/items',
['Accept' => 'application/xml']
),
new Response(
200,
[],
<<<XML
<?xml version="1.0" encoding="UTF-8"?>
<item-list xmlns="http://libero.pub">
<item-ref id="article1" service="scholarly-articles"/>
</item-list>
XML
)
);

self::mockApiResponse(
new Request(
'GET',
'http://localhost/scholarly-articles/items/article1/versions/latest',
['Accept' => 'application/xml']
),
new Response(
200,
[],
<<<XML
<?xml version="1.0" encoding="UTF-8"?>
<item xmlns="http://libero.pub">
<meta>
<id>article1</id>
<service>scholarly-articles</service>
</meta>
<front xml:lang="en">
<id>article1</id>
<title>Scholarly article 1</title>
</front>
</item>
XML
)
);

$crawler = $client->request('GET', '/');
$response = $client->getResponse();

$this->assertSame(200, $response->getStatusCode());
$this->assertSame('text/html; charset=UTF-8', $response->headers->get('Content-Type'));
$this->assertSame('Site Name', trim($crawler->filter('.content-header__title')->text()));
$this->assertSame('Scholarly article 1', trim($crawler->filter('.teaser__heading')->text()));
}

/**
Expand All @@ -45,8 +89,11 @@ public function it_shows_scholarly_articles(string $id) : void
<<<XML
<?xml version="1.0" encoding="UTF-8"?>
<item xmlns="http://libero.pub">
<front xml:lang="en">
<meta>
<id>{$id}</id>
<service>scholarly-articles</service>
</meta>
<front xml:lang="en">
<title>Scholarly article {$id}</title>
</front>
</item>
Expand Down Expand Up @@ -82,8 +129,11 @@ public function it_shows_blog_articles(string $id) : void
<<<XML
<?xml version="1.0" encoding="UTF-8"?>
<item xmlns="http://libero.pub">
<meta>
<id>{$id}</id>
<service>scholarly-articles</service>
</meta>
<front xml:lang="en">
<id>${id}</id>
<title>Blog article ${id}</title>
</front>
</item>
Expand Down
Loading