Skip to content
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

XWIKI-19751: Move the "watch" button for a page to the page content menu #3059

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

surli
Copy link
Member

@surli surli commented Apr 15, 2024

Jira URL

https://jira.xwiki.org/browse/XWIKI-19751

Changes

Description

Goal of this PR is to simplify usage of the watch page feature.
It comes with important changes:

  1. the watch location switches in the bell menu area have been removed
  2. a new button with a logo and a status has been introduced next to edit button
  3. a new modal has been introduced when clicking on the button providing various choices
  4. the watch page API have been modified to not just provide boolean value watch / not watched, but to provide a larger panel of possible statuses
  5. a REST resource have been provided to allow watching / blocking / removing a filter on a location

Clarifications

First important changes to review in that PR are the breaking API: they're emphasized in the revapi ignores I added. Most of them are about unstable APIs, but one of them is a real breakage I opened a brainstorming on the forum about it and I'd like feedbacks about it.

Next important change to review is the new APIs I provide:

  • the REST resource
  • the new statuses

Then only in the end the UI should be reviewed: first thing to review about the UI is the logic of the different choices available in the modal. We can easily change later where we put the button and which vocabulary we use, but if there's a flaw in the logic it's more difficult to change later at it will probably impacts the API.

Screenshots & Video

image
image
image

Capture.video.du.30-05-2024.10.11.19.webm

Note: I'm planning to change a bit the big text below the options we see at 20" in particular to provide a real link and more space.

Executed Tests

Ran:

  • on module xwiki-platform-notifications: mvn clean install -Pquality,integration-tests,docker
  • on module xwiki-platform-legacy-notifications: mvn clean install -Pquality

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches: No

@vmassol
Copy link
Member

vmassol commented Apr 15, 2024

and start introducing a new UIX for the watch button next to the edit button.

Did we discuss the addition of a new menu in the page content? I'm asking since this will clutter the UI more (the top menu will still be there and the net effect would be the addition of a new menu), so we need to be careful.

@surli
Copy link
Member Author

surli commented Apr 15, 2024

and start introducing a new UIX for the watch button next to the edit button.

Did we discuss the addition of a new menu in the page content? I'm asking since this will clutter the UI more (the top menu will still be there and the net effect would be the addition of a new menu), so we need to be careful.

There's an open proposal on the forum for all this, but no conclusion yet. In any case this PR is a very preliminary draft: the UI will probably change but I need to see the possible actions to test and properly fix the APIs.

@surli surli force-pushed the feat-move-watch-button branch 2 times, most recently from 33d607e to 30a9cf9 Compare May 23, 2024 07:04
surli added 18 commits May 30, 2024 10:23
Work in progress: remove UI code for watch switch buttons, and start
introducing a new UIX for the watch button next to the edit button.
Start refactoring API for computing if a page is watched or not to get
all info.
  * Start providing REST API for watch pages to simplify operations
  * Distinguish more cases for watched / ignored pages to improve UI
  * Provide implementation for REST API for watching pages
  * Improve WatchEntitiesManager API to support more operations
  * Improve WatchedEntityReference API to use UserReference
  * Provide a dedicated page to handle watch settings
  * Start writing javascript code to handle choices
  * Fix issue in WatchedEntitiesManager
  * Start providing doc / fixing checkstyle
  * Handle a bit more actions in UI
  * Fix a bug in state computer related to the fact that the scoe filter
    hierarchy is not really a hierarchy
  * Provide a new API to allow computing the reference of the immediate
    ancestor of a page for which a filter exists
  * Improve UI to base possible actions on multiple criteria: current
    watch status, presence or not of a filter on an ancestor, and check
if the page is terminal or not
  * Encode all options for the watch settings modal
  * Provide page object and fix integration tests
  * Ensure to not display the watch status for guest
@surli surli marked this pull request as ready for review May 30, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants