label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

feat: Feature/gridview thumbnail

Open FrsECM opened this issue 1 year ago • 2 comments

PR fulfills these requirements

  • [x ] Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • [ ] Tests for the changes have been added/updated (for bug fixes/features)
  • [ ] Docs have been added/updated (for bug fixes/features)
  • [ ] Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • [x ] Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • [ ] Product design
  • [ ] Backend (Database)
  • [ ] Backend (API)
  • [x ] Frontend

Describe the reason for change

When using multilayered images, the original behaviour was to create a src that separate each image by a ','.

This way, it's not displayable. image

What does this fix?

It fixes an issue in the gridview when there is multiple layers image. image It's even possible to use a specific "thumbnail" field, that allows to add a specific thumbnail to be use. image If you want the thumbnail to be displayed in the column view, just declare it as an image in the taxonomy : image image

What is the new behavior?

There is two different new behaviors. If a "thumbnail" is provided :

  • The gridview uses the thumbnail field. The advantage is the ability to use a thumbnail that has a lower resolution than the original image. else: We use the first image of the multilayer images.

What is the current behavior?

The current behavior is that in this case, images url are separated by a ',' in the image src. What display nothing at all

What libraries were added/updated?

None

Does this change affect performance?

It can improve the performance because thumbnail can be a lower resolution image.

Does this change affect security?

No

What alternative approaches were there?

NA

What feature flags were used to cover this change?

feature bugfix

Does this PR introduce a breaking change?

(check only one)

  • [ ] Yes, and covered entirely by feature flag(s)
  • [ ] Yes, and covered partially by feature flag(s)
  • [ ] No
  • [x] Not sure (briefly explain the situation below)

I don't think it's a huge change in the way labelstudio works.

What level of testing was included in the change?

(check all that apply)

  • [ ] e2e
  • [ ] integration
  • [ ] unit

Which logical domain(s) does this change affect?

GridView => Data Exploration

FrsECM avatar Apr 23 '24 06:04 FrsECM

Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
Latest commit c033950508a25ecd50954fe032348766e6ddd153

netlify[bot] avatar Apr 23 '24 06:04 netlify[bot]

Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
Latest commit c033950508a25ecd50954fe032348766e6ddd153

netlify[bot] avatar Apr 23 '24 06:04 netlify[bot]

/jira create

Workflow run Jira issue TRIAG-577 is created

sajarin avatar May 29 '24 16:05 sajarin

I added to the PR unit tests, also I removed the feature about show thumbnails, we already have something similar to it on the list view that doesn't need add any tags on the config, you just need to add a new node on the data (e.g. thumb), enable this column on the columns dropdown, and change the view mode from str to img on the thumb column, overall it looks good, thanks for the contribution!

If you have a piece of document about that I'm very interessed. It can help when we have very high resolution images.

Thanks !

FrsECM avatar Jun 06 '24 17:06 FrsECM