Skip to content

[Student Learingn] [SL-587, A11Y-121] Update Button.jsx, Get rid of __useDeprecatedTag in DropdownButton.jsx - #51134

Merged
bethanyaconnor merged 3 commits into
stagingfrom
denys/sl/sl-587-initial
Apr 7, 2023
Merged

[Student Learingn] [SL-587, A11Y-121] Update Button.jsx, Get rid of __useDeprecatedTag in DropdownButton.jsx#51134
bethanyaconnor merged 3 commits into
stagingfrom
denys/sl/sl-587-initial

Conversation

@levadadenys

@levadadenys levadadenys commented Apr 5, 2023

Copy link
Copy Markdown
Contributor

[Student Learingn] [SL-587, A11Y-121] Update Button.jsx, Get rid of __useDeprecatedTag in DropdownButton.jsx

  • Button.jsx improvements (style updates, minor refactor, prop for defaultLineHeight)
  • remove __useDeprecatedTag from DropdownButton.js
  • DropdownButton.js is now a button, not a clickable div

We need to carefully merge this PR and check if nothing is broken. If all is ok - we have a quick way to get rid of clickable divs.

useDefaultLineHeight prop is needed to set line height from initial button module styles. In this particular case - we need that prop because parent element of DropdonButton.jsx is display: inline-block; and previous lineHeight is not working properly for that case.

Before:
Знімок екрана 2023-04-05 о 15 10 12

After:
Знімок екрана 2023-04-05 о 16 01 09

Links

Testing story

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@levadadenys
levadadenys requested review from a team, bethanyaconnor and rshipp April 5, 2023 13:34
@levadadenys levadadenys changed the title [Student Learingn] [SL-587, A11Y-121]Denys/sl/sl 587 initial [Student Learingn] [SL-587, A11Y-121] Update Button.jsx, Get rid of __useDeprecatedTag in DropdownButton.jsx Apr 5, 2023
@levadadenys
levadadenys marked this pull request as ready for review April 5, 2023 13:37
@rshipp

rshipp commented Apr 5, 2023

Copy link
Copy Markdown
Contributor

Looks like this causes some vertical shifting for the inline small dropdown buttons we use for resources in ResourceList:

image
image

Compare with the old version:

image
image

Ideally the buttons would be vertically centered with the text, but I think I did some manual pixel offsets here because I was having trouble getting that to work.

* fix ResourceList.jsx dropDown padding positioning
@levadadenys

Copy link
Copy Markdown
Contributor Author

Looks like this causes some vertical shifting for the inline small dropdown buttons we use for resources in ResourceList:

image image

Compare with the old version:

image image

Ideally the buttons would be vertically centered with the text, but I think I did some manual pixel offsets here because I was having trouble getting that to work.

Nice catch, thank you!
Fixed, here's the screenshot of updated styling:
Знімок екрана 2023-04-07 о 16 16 39

@rshipp rshipp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉

@bethanyaconnor

Copy link
Copy Markdown
Contributor

Merging for Denys

@bethanyaconnor
bethanyaconnor merged commit 7d79527 into staging Apr 7, 2023
@bethanyaconnor
bethanyaconnor deleted the denys/sl/sl-587-initial branch April 7, 2023 18:19
bethanyaconnor added a commit that referenced this pull request Apr 7, 2023
…rid of __useDeprecatedTag in DropdownButton.jsx (#51134)"

This reverts commit 7d79527.
bethanyaconnor added a commit that referenced this pull request Apr 7, 2023
…rid of __useDeprecatedTag in DropdownButton.jsx (#51134)" (#51216)

This reverts commit 7d79527.
levadadenys added a commit that referenced this pull request Apr 10, 2023
…sx, Get rid of __useDeprecatedTag in DropdownButton.jsx (#51134)" (#51216)"

This reverts commit d80ce8f.
levadadenys added a commit that referenced this pull request Apr 11, 2023
…sx, Get rid of __useDeprecatedTag in DropdownButton.jsx"" (#51240)

* Revert "Revert "[Student Learingn] [SL-587, A11Y-121] Update Button.jsx, Get rid of __useDeprecatedTag in DropdownButton.jsx (#51134)" (#51216)"

This reverts commit d80ce8f.

* fix javalab return to my project button

* *TeacherDasboardHeader - fix margin-bottom for header buttons back to original size
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.

4 participants