Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Conversation

@james-martin-jd
Copy link
Contributor

…s the problem where only other people's games showed up in the list. The root cause is that we changed predicates to schema:hasPart, but that's only applicable to external games, not self-created ones.

…s the problem where only other people's games showed up in the list. The root cause is that we changed predicates to schema:hasPart, but that's only applicable to external games, not self-created ones.
Copy link
Contributor

@angelaraya angelaraya left a comment

Choose a reason for hiding this comment

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

Mostly styling changes to keep it in sync with the other libs.

* If it is not a container, we are using schema:hasPart so we don't confuse it with a container
* schema:hasPart is used for externally linked games in other people's pods
*/
if (typeValue && typeValue === LDPVocabulary.BASICCONTAINER) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The === should be enough. No need to use && to check if typeValue is falsy.

/**
* Object containing a reference to the UI ontology's IRIs
*/
export const LDPVocabulary = {
Copy link
Contributor

Choose a reason for hiding this comment

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

For the components library I'm using the following convention for vocabs:

/* vocabs.js */
const lpdBase = `http://www.w3.org/ns/ldp#`
export const LPD = {
    BASIC_CONTAINER: `${lpdBase}BasicContainer`,
};
/* client.js */
import { LPD } from '@vocabs';
...

It's up to you if you want to use the same idea here until we use LIT.

if (!document) return gameList;
for await (const item of document['schema:hasPart']) {

const type = await document['rdf:type'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Move these strings (schema:hasPart too) to a const value.

@angelaraya angelaraya merged commit 3cfad95 into develop Jan 3, 2020
@angelaraya angelaraya deleted the bug/game-list-visibility branch January 3, 2020 20:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants