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

Merge @comet/blocks-api into @comet/cms-api #2635

Merged
merged 7 commits into from
Nov 12, 2024

Conversation

johnnyomair
Copy link
Collaborator

@johnnyomair johnnyomair commented Oct 16, 2024

Description

The dedicated @comet/blocks-api package was originally introduced to support projects without CMS parts.
It turned out that this is never the case, so the separation doesn't make sense anymore.
Therefore, the @comet/blocks-api is merged into the @comet/cms-api package.

Example

  • I have verified if my change requires an example

Changeset

  • I have verified if my change requires a changeset

Related tasks and documents

Task: https://vivid-planet.atlassian.net/browse/COM-1120

Further information

The first commit merges the packages, the other commits add some improvements.

@johnnyomair johnnyomair self-assigned this Oct 16, 2024
@johnnyomair johnnyomair marked this pull request as draft October 16, 2024 11:06
@johnnyomair johnnyomair force-pushed the COM-1120-merge-blocks-api-into-cms-api branch from de00d13 to 1376d96 Compare October 17, 2024 10:14
@johnnyomair
Copy link
Collaborator Author

johnnyomair commented Oct 22, 2024

I've compiled a list of newly added exports to the public API:

List of newly added exports
  • AnnotationBlockMeta
  • BaseBlocksBlockItemData
  • BaseBlocksBlockItemInput
  • BaseListBlockItemData
  • BaseListBlockItemInput
  • BaseOneOfBlockData
  • BaseOneOfBlockInput
  • BaseOneOfBlockItemData
  • BaseOneOfBlockItemInput
  • Block
  • BlockContext
  • BlockData
  • BlockDataFactory
  • BlockDataInterface
  • BlockDataMigrationVersion
  • BlockFactoryNameOrOptions
  • BlockField
  • BlockIndexData
  • BlockInput
  • BlockInputFactory
  • BlockInputInterface
  • BlockMetaField
  • BlockMetaFieldKind
  • BlockMetaInterface
  • BlockMetaLiteralFieldKind
  • BlockMigration
  • BlockMigrationInterface
  • BlocksBlockFixturesGeneratorMap
  • BlockTransformerServiceInterface
  • ChildBlock
  • ChildBlockInput
  • ColumnsBlockFactory
  • composeBlocks
  • createBlock
  • createBlocksBlock
  • createListBlock
  • createOneOfBlock
  • CreateOneOfBlockOptions
  • createOptionalBlock
  • createRichTextBlock
  • createSpaceBlock
  • createTextLinkBlock
  • ExternalLinkBlock
  • ExtractBlockData
  • ExtractBlockInput
  • ExtractBlockInputFactoryProps
  • FlatBlocks
  • getBlocksMeta
  • getFieldKeys
  • getMostSignificantPreviewImageUrlTemplate
  • getPreviewImageUrlTemplates
  • getRegisteredBlocks
  • getSearchText
  • inputToData
  • isBlockDataInterface
  • isBlockInputInterface
  • OneOfBlock
  • OptionalBlockInputInterface
  • registerBlock
  • RootBlock
  • RootBlockEntity
  • SearchText
  • SimpleBlockInputInterface
  • SpaceBlock
  • strictBlockDataFactoryDecorator
  • strictBlockInputFactoryDecorator
  • TransformResponse
  • TransformResponseArray
  • transformToSave
  • transformToSaveIndex
  • TraversableTransformResponse
  • TraversableTransformResponseArray
  • typesafeMigrationPipe
  • WeightedSearchText

I've reviewed the list and looked for exports which are too generic. I'd therefore propose the following changes:

  • getFieldKeys -> Remove from public API, since it's only used internally
  • getMostSignificantPreviewImageUrlTemplate -> Rename to getMostSignificantPreviewImageUrlTemplateFromBlock
  • getPreviewImageUrlTemplates -> Rename to getPreviewImageUrlTemplatesFromBlock
  • getSearchText -> Rename to getSearchTextFromBlock
  • inputToData -> Rename to blockInputToData
  • SearchText -> Keep, since SearchText could be used for more than blocks
  • typesafeMigrationPipe -> Rename to typesafeBlockMigrationPipe
  • WeightedSearchText -> Keep, since WeightedSearchText could be used for more than blocks

What do you think? Any other exports you'd like to change?

@johnnyomair johnnyomair marked this pull request as ready for review October 22, 2024 06:20
@nsams
Copy link
Member

nsams commented Oct 22, 2024

aren't those block specific?

  • TransformResponse
  • TransformResponseArray
  • transformToSave
  • transformToSaveIndex
  • TraversableTransformResponse
  • TraversableTransformResponseArray

@johnnyomair
Copy link
Collaborator Author

aren't those block specific?

You're right, I'll rename those as well

@johnnyomair
Copy link
Collaborator Author

@fraxachun do you want to review this?

@fraxachun fraxachun removed their request for review November 12, 2024 08:28
@johnnyomair johnnyomair merged commit bc5f831 into next Nov 12, 2024
12 checks passed
@johnnyomair johnnyomair deleted the COM-1120-merge-blocks-api-into-cms-api branch November 12, 2024 08:40
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.

3 participants