Skip to content

Flexible Pages have additional code to handle symbolic/string keys in content items #5552

Description

@KludgeKML

Introduced (partly) in #5534

We have various code handing the content item passed back to us from content store. The GDS-API adaptor code returns it as a ruby hash, with string keys. But internally, it's nicer to use the modern ruby symbolic keys, and that's what a lot of components want us to pass them.

We've made flexible sections deal with symbolic keys only, but that means a bit of key translation code inside flexible pages, and additional code in app/models/contents_outline.rb to handle both options. Ideally we'd like to just do the conversion to symbolic keys at the point we load the content item, and then use purely symbolic keys internall.

Potential problems: contextual sidebar, where it appears, does a lot of deep looking inside the content item. If it requires string keys, we will have to handle converting when we pass to it.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtPull requests which introduce tech debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions