Django treats path("<name>") like re_path(r"(?P<name>[^/]+)") and
path("<path:name>") like re_path(r"(?P<name>.+)").
This is more readable and consistent than the mix of slightly
different regexes we had before, and fixes various bugs:
• The r'apps/(.*)$' regex was missing a start anchor ^, so it
incorrectly matched all URLs that included apps/ as a substring
anywhere.
• The r'accounts/login/(google)/$' regex was missing a start anchor ^,
so it incorrectly matched all URLs that ended with
accounts/login/google/.
• The type annotation of zerver.views.realm_export.delete_realm_export
takes export_id as an int, but it was previously passed as a string.
• The type annotation of zerver.views.users.avatar takes medium as a
bool, but it was previously passed as a string.
• The [0-9A-Za-z]+ pattern for uidb64 was missing the - and _
characters that can validly be part of a base64url encoded
string (although I think the id is actually a decimal integer here,
in which case only 012345ADEIMNOQTUYcgjkwxyz are present in its
base64url encoding).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
The clipboard tooltip for the "copy and close" button was incorrectly staying visible after the
copy event. Fix this by explicitly hiding tooltips in the click handler.
Fixes#16328.
Improved responsiveness of message reactions tooltip .
Added css property for the reaction tooltip in ./static/js/click_handlers.js so that the tooltip doesn't exceed the sidebar .
Adressed a comment in #15364 .
Compose box placeholder text for streams currently updates when focus
is shifted to the text area.
With this change, it will also get updated when the stream name is
changed (it already updates if topic names are changed).
Currently, compose box placeholder text for PMs only gets updated
when the focus shifts to it.
With this change, the text is now also updated if recipients are
added or removed.
Fixes#15897.
Previously, onPillCreate function was called after the individual
pill object was created.
Now, we call it after creating and adding it to the pill container.
This was converted automatically using a jscodeshift script followed
by running eslint and prettier to convert let -> const (whenever
applicable) and removing "use strict;".
Fixes#16252.
icon* classes are used by bootstrap for displaying glyphicons.
We removed these classes in our custom version of bootstrap 2.1.1;
but since our reset to v2.3.2, they have been added again and hence
any classes starting with icon* in zulip will have to be renamed.
We were not updating the trailing bookend on deactivation of stream
if the user was narrowed to deactivated stream and this commit fixes
this.
For subscribed streams, we just show the trailing bookend with
content as 'This stream has been deactivated' and hide the
Unsubscribe button.
For unsubscribed streams, we change the content of trailing bookend
to 'This stream has been deactivated' and hide the Subscribe button.
Fixes#15999.
Improves the display of error messages on registration page fixing
mis-positioning of error messages and overlapping with other text
in some cases.
Part of: #15750.
This completes the remaining work required to support
addition of all members of another stream.
This allows the creation of stream pills on pasting
the #streamname and copying it from the stream pill.
The user pills uses email ids instead.
And also allows creating stream pills when the user
hides the typeahead.
Tested by commenting out the "set_up_typeahead_on_pills"
line in `stream_edit.js`.
A `node_tests/stream_pill.js` file has been created
for the node tests and the other half of the coverage
check takes place in `node_tests/stream_edit.js`.
We update the pills typeahead logic to also include
stream results and pass the "stream" key in `opts`
to enable this option for the Add subscriber form.
This commit implements the feature of adding all the
subscribers of another stream in the "Add subscribers"
UI, with the help of a new "stream_pill.js` file.
We temporarily add `user_pill.js` to the EXEMPT_FILES
list as typeahead will be set up in `stream_edit.js`
file which does not have any dedicated tests file.
Work towards #15186.
We can safely remove the block added in commit
7d51b6a454
which checks whether the target is a JQuery object
and applies it, if it is not, because re-applying
the JQuery selector on a JQuery object returns the
same object.
We also refactor the related function calls to pass
the target instead of applying the JQuery selector
to it and finding the closest "subscription_settings"
class, as the same operation takes place in the next
line of the removed block. Thus this is redundant too.
The `show_subscription_settings` function is only called
from one place. And the first 2 lines of this function is
redundant as the `sub_settings` are passed to this function
but we obtain it's stream id and again convert it back to
`sub_settings` from it.
We display a centered spinner and hide the Submit / Cancel
buttons in the Move Topic modal similar to what is done in
the Deleting messages modal.
This commit also makes a change where we now close the modal
after success/failure response of the second request instead
of the first.
We don't modify bootstrap.js here but override its popover and
tooltip plugins. In future we will not import these plugins
via npm. We also copy all the popover code from bootstrap.css v2.1.1
to popovers.scss since all the code in bootstrap-tooltip.js is
based upon this css or vice versa.
Update THIRDPARTY info about bootstrap libraries.
There were 4 types of changes to bootstrap.js - bugfixes, file
moves, changes to typeahead plugin and changes to tooltip +
popover plugin.
Bugfixes were automatically fixed when upgrading to v2.3.2, file
moves are irrelevant to this upgrade and the plugins were
extracted into separate files.
46e562f - POPOVER
8779e55 - POPOVER
66c6423 - POPOVER
21ccf45 - POPOVER
cb9b526 - TYPEAHEAD EXTRACTED
3079cf8 - TYPEAHEAD
9ea4f50 - TYPEAHEAD
b961093 - TYPEAHEAD
0e2c509 - TYPEAHEAD
28589c5 - TYPEAHEAD
70a14d8 - TYPEAHEAD
0c42e4a - TYPEAHEAD
213b8ce - FIXED IN 2.3.2
0bac986 - TYPEAHEAD
0e3332d - FIXED IN V2.3.2
eaa777b - TYPEAHEAD
f944a8e - TYPEAHEAD
546ae10 - TYPEAHEAD
3bba0cc - FILE MOVED
b8794e1 - TYPEAHEAD
6217c1a - TYPEAHEAD
dc85fa7 - TYPEAHEAD
d329317 - TYPEAHEAD
b3ef776 - TYPEAHEAD
fcb3999 - TYPEAHEAD
0975cfa - TYPEAHEAD
fbed3e2 - TYPEAHEAD
0fa857d - POPOVER
68b890a - TYPEAHEAD
b5cadec - typeahead
441e429 - copyright
22ce2c0 Fixed In v2.3.2
d78d761- typeahead
bff933e- typeahead
ef585cf- typeahead
7e35369 - typeahead
8f1cee0 - Files moving around
1490ae1 - add file
Changes to bootstrap.css made by us after these are not relevant:
d7f9a21 - Reducing z-index of overlay doesn't make sense.
9b740df - some changes were added.
1143ed7 - changes in above commit were moved to a different file.
We don't want bootstrap-btn css from v3.1.1 overlapping with v2.3.2's
.btn css; so we remove it.
Commits that were skipped:
3142d74 - false typo fix. It add support for IE9.
ead73f3 - We retain Glyphicons since they don't make any difference.
3bba0cc - Moving code around.
This commit starts to bring back our changes to bootstrap
files. We try to move these changes to zulip.scss as much
as possible. We are starting with bootstrap.css.
Apply fix in commit 7a3a3be.
Changes before 7a3a3be that
were not to be added. These mostly involve moving files around
and hence are not relevant.
441e4295e2c49389ed4448f1cee01490ae1
We merge bootstrap-responsive.css into bootsrap.css since that is
how bootstrap distributes it from this version onwards.
bootstrap.js has a lot of changes to it which completely breaks
our typeaheads and popovers, so we will have to override these
plugins with our version of these plugins. In future versions
of bootstrap when we use npm, we can just choose not to
import them.
This commit clearly shows what changes we made to the bootstrap
library for a future reference.
bootstrap-btn.css was left out since it is from version v3.1.1. We
will integrate custom changes made by us into zulip when we upgrade
to v3.x.
We have also removed our license from these files.
We were showing the incorrect error message when the user who
is trying to deactivate himself is the last owner. This commit
fixes this to show "Cannot deactivate the last organization owner"
instead of "Cannot deactivate the last organization administrator".
We had already removed the restriction for deactivating last admin
and added it for last owner, while adding the new owner role.
This handles a rare race condition that occurs when the session hash
is not updated by the backend during the password change process.
This mostly occurs in puppeteer tests, but could occur to a user.