Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Come together and refine project data format #5

Open
thiagodemellobueno opened this issue Sep 29, 2017 · 4 comments
Open

Come together and refine project data format #5

thiagodemellobueno opened this issue Sep 29, 2017 · 4 comments

Comments

@thiagodemellobueno
Copy link
Contributor

Right now top level pages are an associative array with slugs:

'gathercontent': {
  'pages': {
    'home' : { … },
    'about-us': { … },
    …
 }

but children of pages, or components are arrays

'home': {
  'children': [ ... ],
  'components': […]
}

this is fine for lots of situations, but there are situations where having an enumerated object with keys would be better, eg:


'about-us': {
  'children': {
    'our-mission': {…},
    'the-team': {…}
 }
}

should we make both?
should we use objects always and walk it differently?
how does this play with maintaining proto-durps parity?

@soniktrooth
Copy link

When it comes to the Derps, the only way to identify any given piece of content is via an entity ID so unless we're maintaining a map of section => id somewhere then I don't know that we can do that. e.g.

{
    'our-mission': 24,
    'the-team': 15,
    'blah': 65
}

Where the numbers are entity ids of ¶s.

It's possible though we could just wipe out the contents of the ¶ field and recreate it every time we are updating Drupal from GatherContent. Therefore, the node id would stay the same but the content would change. The only problem area with this approach would be the notion of 'reusable' content because we wouldn't want to wipe out an entity that was referenced from another node.

@thiagodemellobueno
Copy link
Contributor Author

thiagodemellobueno commented Sep 30, 2017 via email

@hawkeyetwolf
Copy link

Oooh, I like this. What about using Blocks? They are "re-usable" content, whereas Paragraphs are meant to be used in one place only. Therefore, the block IDs are more "permanent" where the Paragraphs IDs are kinda transient. It's on my rainy-day to-do list to add the Kalagraphs behaviour to blocks, too, so we have the full flexibility in both places (re-usable and page-specific content).

@thiagodemellobueno
Copy link
Contributor Author

Gonna keep this open, even though there were some big changes to how we do things that kind of obviates it. But there are probably other plugings / enhancements that can benefit from this discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants