Commit Graph

15 Commits

Author SHA1 Message Date
Lauryn Menard d3a513f4bd image-upload-widget: Render `image_disabled` div if text to display.
If there is no `disabled_text` provided for the image upload widget,
then there is no need to have the `image_disabled` div rendered in
the template. This allows the hover CSS rules to be more general for
the image upload widget in general.

Adds a check for `disabled_text` around the `image_disabled` div
element in `image_upload_widget.hbs`.

Also, changes `image_upload_background` class to
`image_hover_background` so that it more accurately describes what
the CSS rule is for and why it's used in both the `image_disabled`
div and the `image_upload_button` div.
2023-01-11 13:12:59 -08:00
Manas Jayaswal 3cbec56e81 image-upload-widget: Fix hover behavior when image cannot be changed.
The `hide` CSS rule in `app_components.css` was being overwritten
by the more specific rules in `image_upload_widget.css`, which
meant that when changing the inage was disabled the hover text for
updating or deleting the image was still visible.

Adds `hide` class (and therefore more specific rule) to
`image_upload_widget.css` for when this text should be display
none.

Fixes #23844.
2023-01-11 13:12:59 -08:00
sayamsamal 5fb3aa4f44 CSS: Deduplicate CSS in image_upload_widget.css. 2022-03-18 14:43:13 -07:00
sayamsamal b06178767b settings: Fix upload spinner alignment in image upload widgets.
The upload spinners for all of the image upload widgets were in
wrong alignment due to the use of magic numbers to center them.

This commit replaces the above mentioned approach with the use
of flexbox to fix alignment issues across all the image upload widgets.
2022-03-18 14:43:13 -07:00
sayamsamal 7fcac3288b settings: Fix alignment issues for non-English languages.
Due to differences in length of the words for different languages
there were alignment issues in the organization profile settings.

This commit uses flexbox to ensure that the alignment stays correct
for any changes in language/word length.

Fixes #21385
2022-03-18 14:43:13 -07:00
Sayam Samal 2f606ffbd9 settings: Fix text alignment issues in profile picture overlay.
Fixes #21342
2022-03-10 15:10:24 -08:00
Sayam Samal cccb3b1b32 settings: Move user details to the right side panel in profile section.
This commit moves the "Role" and "Joined" attributes to the right
side panel of settings/profile to maintain continuity between the
mutable fields.
2022-03-10 15:10:24 -08:00
Sayam Samal 2bf63c1e49 settings: Remove profile picture header in the profile section.
This commit removes the profile picture header and adds an overlay to
handle disabled avatar changes in an organization.
2022-03-10 15:10:24 -08:00
Sayam Samal d5821858dc settings: Fix hidden delete button in profile picture section.
This commit fixes the issue where the delete (x) button on the
top right corner of the profile picture section remains hidden
even when a hover action is performed on the profile photo.
2022-03-10 15:10:24 -08:00
Sayam Samal d763847cb9 settings: Fix overflow due to unset border-radius. 2022-02-22 10:42:21 -08:00
Sayam Samal bbfc958c62 settings: Fix responsiveness of the profile avatar.
Moves the profile avatar to the top when the viewport is narrowed down.

Tweaked by tabbott to add the 20px bottom margin in a more consistent
way, which also lets us deduplicate some code.

Fixes #21000.
2022-02-22 10:41:59 -08:00
Ganesh Pawar 8730bd8b94 delete avatar: Improve accessibility by converting <span> to <button>.
Since it's a button, it doesn't need the "keydown" event. So,
removed it. This fixes the bug where pressing any key while the
avatar's delete_button was in focus would pop up the modal.
It was introduced in e5d0448505.
2021-10-26 17:51:38 -07:00
Anders Kaseorg ea88ec9e06 styles: Fix stylelint rule-empty-line-before.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-10-17 07:15:09 -07:00
sahil839 a14d649444 styles: Fix line-height of delete button of image-upload-widget.
This commit fixes the bug with the delete button of both profile
picture and realm-logo buttons. The button was shifted downwards
and was caused due to line height change in 5d64c21c38.

Found the correct value of 20px by checking the line-height in
one test organization on zulipchat.com where the button position
looks correct.
2021-06-24 14:36:58 -07:00
Anders Kaseorg a3d26d701e styles: Rename .scss files back to .css.
css-loader@4 broke @import statements referencing files with
extensions other than .css, unless those @import statements are
compiled away by another loader.  Upstream is more interested in
arguing that such @import statements are semantically incorrect than
applying the one line fix.

https://github.com/webpack-contrib/css-loader/issues/1164

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-15 16:33:28 -07:00