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

Hiding "Label All Tasks" button #5

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

lizfaubell
Copy link

@lizfaubell lizfaubell commented Jul 22, 2024

Summary:

The default choice is “Label All Tasks” rather than “Label Tasks As Displayed”, which is really confusing when you’re on a tab with your selected tasks (most common labeling setup). With our current setup this code is in the DataManager repo, which we haven’t forked (and is deprecated). Once we update to new version of label studio this will all be in one repo but for now gonna do a hack and just hide the button. Labellers will be able to just click on a task in their tab to get started.

Issue: https://khanacademy.atlassian.net/browse/DI-1500

Test plan:

  • ran label studio locally, created a project, imported a task, confirmed button is gone (see screenshots)
with-button without-button

@lizfaubell lizfaubell self-assigned this Jul 22, 2024
@lizfaubell lizfaubell requested review from dat-boris and a team July 22, 2024 22:03
@lizfaubell
Copy link
Author

Since the diff is really hard to view: I added "display:none" to the .dm-button_look_primary class:

.dm-button_look_primary{--button-color:#fff;background-color:#09f;box-shadow:none;box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);display:none}

@lizfaubell lizfaubell marked this pull request as ready for review July 22, 2024 22:04
Copy link

@dat-boris dat-boris left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for this css surgery to put in this fix - and explaining the css that is added. This is a good temporary fix, and a good motivation for us to upgrade to Label Studio latest version 😄

To be careful I validated what will be the impact of the class hiding.

document.getElementsByClassName("dm-button_look_primary")

I see 3 elements that is affected on the page here, and looks like all other primary CTA are with different classname (e.g. the "Submit" button is different). So this should be good as a temporary fix!

I have a quick question around deploy process - will DM on slack for that!

@lizfaubell lizfaubell changed the base branch from fe-mathjax to develop July 22, 2024 22:43
The default choice is “Label All Tasks” rather than “Label Tasks As Displayed”, which is really confusing when you’re on a tab with your selected tasks (most common labeling setup). With our current setup this code is in the DataManager repo, which we haven’t forked (and is deprecated). Once we update to new version of label studio this will all be in one repo but for now gonna do a hack and just hide the button. Labellers will be able to just click on a task in their tab to get started.

Issue: https://khanacademy.atlassian.net/browse/DI-1500

Test plan:
- ran label studio locally, created a project, imported a task, confirmed button is gone (see screenshot)
@lizfaubell lizfaubell force-pushed the remove-label-tasks-button-di-1500 branch from 804f6a8 to 69ec993 Compare July 22, 2024 22:45
@lizfaubell lizfaubell merged commit b26c0b4 into develop Jul 23, 2024
1 check passed
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