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

isom-1655 display block contents for identification #867

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

adriangohjw
Copy link
Contributor

@adriangohjw adriangohjw commented Nov 7, 2024

Problem

Closes https://linear.app/ogp/issue/ISOM-1655/display-block-contents-for-identification

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
    • Details ...
  • No - this PR is backwards compatible

Features:

  • added logic to generate label based on block content

Screenshots

(refer to storybook for full list of examples)

image

Copy link

linear bot commented Nov 7, 2024

Copy link

vercel bot commented Nov 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
isomer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 4:38am

@adriangohjw adriangohjw self-assigned this Nov 7, 2024
@adriangohjw adriangohjw added the enhancement New feature or request label Nov 7, 2024
@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Nov 7, 2024

Datadog Report

Branch report: adriangohjw/isom-1655-display-block-contents-for-identification
Commit report: aa6540c
Test service: isomer-studio

✅ 0 Failed, 175 Passed, 34 Skipped, 37.27s Total Time
🔻 Test Sessions change in coverage: 1 decreased (-0.02%)

🔻 Code Coverage Decreases vs Default Branch (1)

  • vitest run --coverage 1.16% (-0.02%) - Details

Copy link
Contributor

@seaerchin seaerchin left a comment

Choose a reason for hiding this comment

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

alot of the code here is complicated because it appears to be dealing with prose - if we use tiptap on studio (not on components), this would be alot easier

Copy link
Contributor

Choose a reason for hiding this comment

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

just abit confused - why are we adding this here when the dependency is in studio?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i think it's a tough greyline as the initial implementation is to have it in studio

but had a discussion with @dcshzj and decided that studio shouldn't have to know what's going on in the Component library. Plus when we add new component on the Component library, we will also be less likely to forget about it

function getTextContentOfProse(content: ProseContent): string {
const values: string[] = []

function recursiveSearch(obj: Record<string, unknown>) {
Copy link
Contributor

Choose a reason for hiding this comment

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

i haven't tried it yet, but editor.getText (see here) seems ideal for this - should we do it on studio since this appears to be studio specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we aren't using the tiptap editor for this part yet

Copy link
Contributor

Choose a reason for hiding this comment

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

nono, i mean since this part comes from tiptap, we can shift this over to tiptap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh as in, current implementation is to put it in Component library which don't have tiptap installed

Copy link
Contributor

Choose a reason for hiding this comment

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

eh bad phrasing on my end, i meant since this part comes from tiptap, we can shift over to studio!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants