Commit Graph

161 Commits

Author SHA1 Message Date
majordwarf 298d2c5a17 css: Use SCSS nesting in settings.scss for `.input-group`. 2020-05-12 23:17:27 -07:00
majordwarf 03a95cfe49 css: Use SCSS nesting in settings.scss for `.dynamic-input`. 2020-05-12 23:17:27 -07:00
majordwarf 1384050683 css: Use SCSS nesting for child elements of `.dynamic-input`. 2020-05-12 23:17:27 -07:00
majordwarf 5af7665b3c css: Reorder `.dynamic-input` to put next to each other. 2020-05-12 23:17:27 -07:00
majordwarf 6371f0109c Use: SCSS nesting in settings.scss for `.table` in `#admin-user-list`. 2020-05-12 23:17:27 -07:00
majordwarf 70ef0e9232 css: Use SCSS nesting in settings.scss for `.settings-info-icon`. 2020-05-12 23:17:27 -07:00
majordwarf 796d3c2e7f css: Use SCSS nesting in settings.scss for `#settings_content`. 2020-05-12 23:17:27 -07:00
majordwarf 806269fc40 css: Reorder `#settings_content` to put next to each other. 2020-05-12 23:17:27 -07:00
majordwarf f6b3aa4e8b css: Use SCSS nesting for avatar, logo and icon selectors. 2020-05-12 23:17:27 -07:00
majordwarf 8543750d43 css: Reorder avatar, logo and icon selection next to each other. 2020-05-12 23:17:27 -07:00
majordwarf cc21c45c7a css: Refactor `.inline-block` in settings.scss. 2020-05-12 23:17:27 -07:00
majordwarf 02516c6f69 css: Use SCSS nesting in settings.scss for `.user-avatar-selection`. 2020-05-12 23:17:27 -07:00
majordwarf 895945b165 css: Reorder `.user-avatar-selection` to put next to each other. 2020-05-12 23:17:27 -07:00
majordwarf aed2450cc0 css: Use SCSS nesting in settings.scss for `label`. 2020-05-12 23:17:27 -07:00
majordwarf bc6baa9f2b css: Reorder `label` next to put next to each other. 2020-05-12 23:17:27 -07:00
Steve Howell d5cadbcec2 user settings: Separate code for bot form.
When editing a bot, there are only two fields
that are similar to humans--full name and
email--which are trivial.

Before this commit we used a single codepath
to build the human form and the bot form.

Now we have two simple codepaths.

The tricky nature of the code had already led
to ugly things for the bot codepath that
fortunately weren't user facing, but which
were distracting:

    - For bots we would needlessly set things
      like is_admin, is_guest in the template
      data.

    - For bots we would needlessly try to update
      custom profile fields.

The code that differs between bots and humans
is nontrivial, and the code was both hard to read
and hard to improve:

    - Humans don't have bot owners.

    - Bots don't have custom profile fields.

The bot-owner code is nontrivial for performance
reasons.  In a big realm there are tens of thousands
of potential bot owners.  We avoid the most egregious
performance problems (i.e we don't have multiple
copies of the dropdown), but we may still want
to refine that (at least adding a spinner).

The custom-profile-fields code is nontrivial due
to the dynamic nature of custom profile fields,
which can bring in specialized widgets like
pill fields.

Now each form corresponds to a single endpoint:

    * human -> /json/users
    * bot -> /json/bots

Before we had a lot of conditional logic in
the template, the code to build to views, and
the code to submit the data.  Now everything is
much flatter.

The human code is still a bit messy (more work
coming on that), but the bot code is fairly
pristine.  All three components of the bot code
fit on a page, and there are no conditionals:

    - admin_bot_form.hbs
    - open_bot_form
    - handle_bot_form

We may want to grow out the bot code a bit
to allow admins to do more things, such as
adding services, and this will be easier now.
It would also be easier for us now to share
widgets with the per-user bot settings.

Note that the form for editing human data will
continue to be invoked from two panels:

    - Users
    - Deactivated users

There are some minor differences between
users and deactivated users, but the shape of
the data is the same for both, so that's still
all one codepath.

We eliminate `reset_edit_user` here, since
it was never used.

One nice thing about these forms was that they
had very little custom CSS attached to them
(at form-level specificity), and it turned out
all the custom CSS was for the human-specific
form.
2020-05-09 10:22:37 -07:00
vaibhavrajsingh2001 a3d51ae9af regression: Add minimum height to custom user field textbox.
Also, if the width of the texbox increased too much, the avatar icon
would move below. Fixed by setting max-width that matches the width of
the other textboxes.

Fixes: #14826
2020-05-01 11:00:56 -07:00
Pranav 43b0acdae8 settings: Use & selector reference to correctly style alerts.
The alert-error class styling was not being applied to alert-notifications
because of incorrect styling. The alert-notifications and the
alert-error classes were applied to the same element, whereas the CSS
expected the alert-error class to be applied to children of the class
with alert-notifications. Fixed this by using the parent-selector
reference '&' to correctly select the styling.
2020-04-30 16:13:49 -07:00
vaibhavrajsingh2001 bde965aed0 user settings: Correct overflow behaviour of custom user field.
Fixes: #14816
2020-04-30 12:54:20 -07:00
Jagan 805ac2475b settings: Redesign edit bot form.
This removes the weird edit-bot sidebar, replacing it with a modal,
matching our edit-user widget (and various similar ones).

Fixes #13644 by removing the buggy code.
2020-04-28 23:08:45 -07:00
Rohitt Vashishtha 5098944afc settings: Consolidate CSS of all dropdown widgets. 2020-04-22 17:57:16 -07:00
jagansivam28 0de77cabb0 settings UI: Add brighness on hover effect for "X" icon in upload avatar.
Increase brightness on hover effect for "X" icon in upload
avatar area is added and change the text to "delete profile picture"
while hovering over "X" icon in the avatar upload area.
2020-04-21 13:27:55 -07:00
Jagan e5d6e2e44f settings UI: Fix hovering bug in "Uploaded files" settings.
While Hovering over some cell of the tables in settings Tab
increase the cell width since we are using the pseudo-Element `:: after`
the bug is fixed by adding `position: absolute;`.
fixes #14559
2020-04-17 11:35:31 -07:00
Abhishek-Balaji b40bd56f3e alert settings: Change style of alert words list.
Narrowing the list of words by reducing margin and padding.
Also reducing the width to 50% of the previous value.
2020-04-15 17:56:14 -07:00
Abhishek-Balaji 52e0063deb alert settings: Move alert word form on top and sort alert words.
The form for entering alert words has been moved above the list
of words.
The list of words will be presented alphabetically rather than
time of addition.
2020-04-15 17:56:14 -07:00
Jagan 8ae34eaa12 settings UI: Make the settings avatar delete/edit UI slicker.
Added UI support for uploding the new profile picture by
clicking on the avatar rather than a button.
Added new spinner for loading indication while uploading
a new avatar over the avatar area.
Fixes #10255
2020-04-15 15:15:57 -07:00
Rohitt Vashishtha f9caf522f0 markdown: Allow setting a default language for code blocks.
This adds a new realm setting: default_code_block_language.

This PR also adds a new widget to specify a language, which
behaves somewhat differently from other widgets of the same
kind; instead of exposing methods to the whole module, we
just create a single IIFE that handles all the interactions
with the DOM for the widget.

We also move the code for remapping languages to format_code
function since we want to preserve the original language to
decide if we override it using default_code_clock_language.

Fixes #14404.
2020-04-09 16:02:02 -07:00
Tim Abbott e84d5ae2a5 settings: Improve styling of emoji in admin table.
This styles the emoji in the administrator table to look exactly how
they'll look in a real message, aside from being a bit bigger.
2020-04-08 14:43:20 -07:00
Yash Rathore d6fddad440
settings: Use % width for checkbox labels in small narrows. (#14448)
This fixes the responsive design for most of our settings pages.

Fixes #14426.
2020-04-03 11:40:02 -07:00
Ryan Rehman 412eb6f1cb css: Refactor `.alert-notification`.
Since each element containing the `.alert-notification`
class has a predefined area that wont overlap with any
other element, we make changes to the CSS so that it
just stays hidden until the text appears.
2020-04-01 14:40:41 -07:00
Ryan Rehman 95c97e4a46 css: Use SCSS nesting for `.alert-notification`.
We also remove the `#settings_page` container as there
are plans to reuse the above class in the stream edit
page as well.
2020-04-01 14:40:41 -07:00
Ryan Rehman 9cb2475b53 notification_settings: Display streams that differ.
The user has an option for setting global
notification settings as well as the same settings
for individual streams. Currently the user has to
keep track of each unmatched stream and then visit
each individual stream whose settings he wants to
update.

Thus this adds a dedicated UI table allowing the user
to view and update the notifications of the specific
streams which differs from the global settings.
It is located on the same page where the user defined
global notification settings can be modified.

Fixes #9228.
2020-03-31 15:57:47 -07:00
Pragati Agrawal dd13136371 settings: Migrate notification checkboxes to table format.
Here we have migrated checkboxes of all general notifications to the table.
By general notifications we mean, Mobile, Email, Desktop audio, and visual
notifications.

This is a part of a bigger migration to simply our notifications setting
changing infrastructure for all streams and individual streams. Later we
will add more row to this for different categories of notifications in
addition to the current ones ("Streams" and "PMs, mentions, alerts").

Fixes: #12182.
2020-03-25 17:45:59 -07:00
Divyanshu Agrawal c0e19ed905 settings page: Change cursor for date input to 'pointer'.
Currently, the cursor for the date input field in the settings page
is 'not-allowed' as it has the disabled attribute because we want
users to pick the date from the date picker. But this leads to
confusion whether the field is editable at all.

Change the cursor to 'pointer' to make it clear that the field has
a click action associated with it.
2020-03-05 11:10:42 -08:00
Ryan Rehman 5d7669e57e stream settings: Add links to /help/ for stream type settings. 2020-02-18 10:53:46 -08:00
Anders Kaseorg 27fac76da8 styles: Move media queries into the files they override.
Webpack code splitting will make the inclusion order of CSS files less
obvious, and we need to guarantee that these rules follow the rules
they override.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-10-28 15:39:17 -07:00
YashRE42 5329d24849 settings page: Align permission "Discard" option.
In 50545a3 we made an incomplete revert of some style changes from
7b8da9b, this commit reverts the "x" to "fa fa-times" and also fixes an
alignment issue for the "Discard" box in chrome.
Fixes #13233.
2019-10-07 11:58:24 -07:00
YashRE42 7d46da0fce acount_settings: Fix position of avatar source.
The avatar source was misspositioned when avatar changes were disabled.
This also repositions the "X" for when avatar changes are allowed.
Fixes #12524.
2019-09-30 11:10:56 -07:00
YashRE42 10fd5db190 account-settings: Lighten user avatar source. 2019-09-30 11:10:56 -07:00
Tim Abbott 8b5df88596 css: Make label CSS usable outside settings model.
We intend to use it in the "manage streams" modal as well.
2019-09-05 11:48:32 -07:00
Anders Kaseorg 4de3bbeafa styles: Finish removing manual antialiasing configuration.
Followup from commit ddb965110f.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-30 14:51:52 -07:00
Anders Kaseorg abbd8a7f45 styles: Remove most vendor-prefixed CSS attributes.
Many of them are now automatically generated by autoprefixer, while
others are unnecessary based on .browserslistrc, and some were just
wrong (the linear-gradient based checkerboard pattern in lightbox has
been broken in Firefox for a while).

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-30 14:51:52 -07:00
Yashashvi Dave 166d4ce630 custom fields: Change field alert notifications style in user settings. 2019-08-25 20:57:27 -07:00
Thomas Ip d86299309a org settings: Reduce the width occupied by the actions column in tables. 2019-08-22 13:13:24 -07:00
Thomas Ip 808641a603 css: Tweak sortable list styling to make sortable columns more obvious. 2019-08-21 16:50:22 -07:00
Thomas Ip e309168d11 org settings: Make linkifiers table sortable. 2019-08-21 16:50:22 -07:00
Pragati Agrawal c29b197ec7 org settings: Replace usage of ids with classes for upload button. 2019-08-21 15:49:25 -07:00
Pragati Agrawal a6cd0b8788 org settings: Use `realm-logo-img` class as identifier of realm logo image.
This replaces previously being used ids, `realm-settings-logo` and
`realm-settings-night-logo` with a common class `realm-logo-img`.
2019-08-21 15:49:25 -07:00
Pragati Agrawal eedcdf7f3b settings/styles: Reorder `.settings-section .table-striped` to same place. 2019-08-18 12:44:40 -07:00
Pragati Agrawal 78d6ecfa08 settings/styles: Use `.settings-section` for settings `.table-striped`.
We have used `.settings-section .table-striped` for other rules to refer the same elements
which are referred by `#settings_page .table-striped`.
2019-08-18 12:44:40 -07:00