isso icon indicating copy to clipboard operation
isso copied to clipboard

admin: Add support for comment search by Thread URL in admin interface

Open pkvach opened this issue 1 year ago • 3 comments

Checklist

  • [x] All new and existing tests are passing
  • [x] I have added an entry to CHANGES.rst because this is a user-facing change or an important bugfix
  • [x] I have written proper commit message(s)

What changes does this Pull Request introduce?

The main theme of the changes is to enhance the comment search functionality in the admin interface. The changes allow searching for comments not only by comment URL but also by thread URL.

Why is this necessary?

  • https://github.com/isso-comments/isso/issues/642
  • https://github.com/isso-comments/isso/pull/1000

pkvach avatar Apr 27 '24 22:04 pkvach

Thanks for the PR!

I'm happy to help :)

Could we perhaps find a better way to convey to admins that they can enter both thread and individual comment URLs?

There is an option to add a tooltip with explanatory text. This will not take up too much space.

Also, would it make sense to make the search field a bit smarter and just let it accept plain numbers (for comment ids) as well?

Then we will definitely need explanatory text and will have to give up <input type=“url”>.

pkvach avatar Apr 29 '24 18:04 pkvach

Could we perhaps find a better way to convey to admins that they can enter both thread and individual comment URLs?

There is an option to add a tooltip with explanatory text. This will not take up too much space.

Good idea. Something like <abbr> that pops on mouseover will not work on mobile, but if you have a good solution, go for it.

Also, would it make sense to make the search field a bit smarter and just let it accept plain numbers (for comment ids) as well?

Then we will definitely need explanatory text and will have to give up <input type=“url”>.

On second thought, let's not implement the "smart" search and leave it as is. It would just be confusing.

ix5 avatar Apr 29 '24 20:04 ix5

I added a tooltip with help text next to the search field. It's ready for review.

pkvach avatar May 02 '24 22:05 pkvach

Nice, the tooltip is really useful.

I'd just want it a bit more integrated/look alike the rest of the surrounding buttons, so that it's clearer it is clickable.

Current: Screenshot from 2024-05-03 19-03-18

With more prominent border and shadow: Screenshot from 2024-05-03 19-02-55

Thank you for the review and a nice addition. I made the suggested changes and did squash commits.

pkvach avatar May 04 '24 07:05 pkvach

Merged, thanks!

ix5 avatar May 04 '24 18:05 ix5