Skip to content

Update flourish to include more on the reference#3

Merged
chee merged 1 commit into
mainfrom
flourish
Jan 5, 2023
Merged

Update flourish to include more on the reference#3
chee merged 1 commit into
mainfrom
flourish

Conversation

@adgad
Copy link
Copy Markdown
Collaborator

@adgad adgad commented Jan 5, 2023

These are all properties that are available on the tag at the moment: <ft-content type=\"http://www.ft.com/ontology/content/Content\" url=\"http://api.ft.com/content/1760409\" alt=\"\" data-asset-type=\"flourish\" data-embedded=\"true\" data-flourish-type=\"story\" data-layout-width=\"\" data-time-stamp=\"\" id=\"1760409\"></ft-content>

@adgad adgad requested review from a team as code owners January 5, 2023 11:44
Comment thread README.md
interface FlourishReference extends Reference {
referencedType: "flourish"
flourishType: string
layoutWidth: "" | "full-grid"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Interestingly in our content pipeline API we transform this into a boolean (fullGrid: true). Should we do the same here? Or are we trying to be consistent with other things that have this? (Layouts?)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Layout values:
full-grid, fullGrid, inset-left, true.

I'm pretty sure full-grid/fullGrid means different things for all instances.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think in general we have three different "widths":

  • inset-left (floated in the article)
  • the width of the article copy (which is probably the default)
  • bleeding outside the article copy

Ideally I think we have a single property (layoutWidth) for anythig that can have different widths, and three options for what they could be.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Okay, maybe:

  • "" = normal width (the width of the article copy)
  • inset-left = inset left (for things that allow it)
  • full-grid = bleeds to the full width of the grid

I think that works and makes sense. So I think:

  • keep this as is
  • CardLayout when we do it should follow the same pattern.
  • Our CP content pipeline API can keep it as a string (and change it to boolean if it needs to in the JSX)

Gosh that was a journey.

Copy link
Copy Markdown
Contributor

@chee chee left a comment

Choose a reason for hiding this comment

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

i approve!

@chee chee merged commit 75c8d58 into main Jan 5, 2023
@chee chee deleted the flourish branch January 5, 2023 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants