-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
search: Add jump to date feature. #25014
base: main
Are you sure you want to change the base?
Conversation
Hello @zulip/server-search members, this pull request was labeled with the "area: search" label, so you may want to check it out! |
8167b88
to
814529e
Compare
814529e
to
63a7e24
Compare
8672e16
to
3c07812
Compare
e793598
to
a899443
Compare
a899443
to
6ba65a9
Compare
6ba65a9
to
362dca7
Compare
Thanks! A few thoughts:
Jump to dateClick on any date to scroll your view.
|
I think we'll also want to fiddle with the visuals for the "Scroll to top" button. I would try:
|
Addressing your first feedback,
|
@alya I've addressed your feedback. |
Hmm, did you change the shape? The color is certainly not the same in your latest screenshot. |
You can post in #design for more feedback. |
This is also a fine #design topic. |
OK, cool, you can post that vs. the centered button for general feedback as well. |
Addressed feedback and updated the PR description with latest screenshots! |
7d447d5
to
973c8c7
Compare
We currently do not have support for jumping to messages sent on a specific date for a particular stream or topic. The approach here is to add a `flatpickr` popup when we click on the `recipient_row_date` which will make the view jump to the messages sent on the selected date when confirmed. Used `date.sent` column of `zerver_message` table to compare the date to the selected date which comes in through `anchor_date` parameter that is added to `/json/messages` endpoint. Also, added frontend and backend test along with modifying the existing ones. Continues the work of zulip#24357. Fixes zulip#23995. Co-authored-by: Lakshay Mittal <lakshaymittal225@gmail.com> Co-authored-by: baris <e253436@metu.edu.tr>
We might want to scroll to the top of a topic or stream or all messages but we do not have any option but to scroll right now. Added a button in the `flatpickr` that pops up when we click on the date in `recipient_row_date`. A dependency is added for this: `shortcut-buttons-flatpickr`. The appoach is to add the plugin this dependency contains in the `flatpickr` and then whenever `onClick` is called, the required behavior will take place as we're passing the beginning of the time "1970-01-01" as date through `null`.
The current version only shows the complete date in tippy. Updated version will show a `(Click to jump dates)` along with that full date to inform users about this feature.
Disable all future dates for flatpickr to jump to messages of a particular date.
The top corners were poking out of the dialog in dark theme because of an explicit background color (for dark theme only). Added a "border-radius" for the concerned element.
973c8c7
to
9e726ea
Compare
Heads up @lakshaykananiya, we just merged some commits that conflict with the changes you made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the feedback. @lakshaykananiya
query: Union[SelectBase, Tuple[SelectBase, SelectBase]] | ||
query, inner_msg_id_col = get_base_query_for_search( | ||
user_profile=user_profile, | ||
need_message=need_message, | ||
need_user_message=need_user_message, | ||
anchor_date=anchor_date, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to change the base query? Just add another mapping for operator and it's method in by_method_map
(check NarrowBuilder
). And then you can send a query with a new operator type: near-date
.
4ec3636
to
88b200c
Compare
We currently do not have support for jumping to messages sent on a specific date for a particular stream or topic.
The approach here is to add a
flatpickr
popup when we click on therecipient_row_date
which will make the view jump to the messages sent on the selected date when confirmed.Used
date.sent
column ofzerver_message
table to compare the date to the selected date which comes in throughanchor_date
parameter that is added to/json/messages
endpoint.Continues the work of: #24357.
Fixes: #23995.
Update # 1:
Added a button in the
flatpickr
that pops up when we clickon the date in
recipient_row_date
.A dependency is added for this:
shortcut-buttons-flatpickr
.The approach is to add the plugin this dependency contains in
the
flatpickr
and then wheneveronClose
is called,the required behavior will take place as we're passing the
beginning of the time "1970-01-01" as date through
null
.Update # 2
The current version only shows the complete date in tippy.
The updated version will show a
(Click to jump dates)
alongwith that full date to inform users about this feature.
Update # 3
Addressed feedback,
Scroll to top
button.Scroll
to top` button.Completed:
Info: This PR solves one issue that is part of my GSoC proposal.
Screenshots and screen captures:
Latest screenshots
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: