Announcement Page Route Handling

Background

Announcement feature contains pages like Compose,Outbox,Inbox,View Announcement etc. At Present we are handling the child route url changes of announcement with respect to the context of parent page.

For example,

1. if user clicks on announcement from any outbox list page, it opens up the specific announcement in a new page popup with following route url format:

announcement/outbox/:page_number/view/:announcementId  (announcement/outbox/2/view/952d2d30-47c7-11e8-8de6-5905d18b2f6b)

2. if user clicks on announcement from any inbox list page, it opens up the specific announcement in a new page popup with following route url format:

announcement/inbox/:page_number/view/:announcementId  (announcement/inbox/1/view/072ba470-6816-11e8-a983-7f2bceabc273)

In above 2 scenarios both route url segments contains page number which helps to land on particular inbox/outbox page when user closes announcement details popup.


Proposed Change

The url's of announcement details page should be changed like the following example and page number should be passed through state/route param from inbox/outbox page.

  1. announcement/inbox/view/:announcementId  (announcement/inbox/view/072ba470-6816-11e8-a983-7f2bceabc273)
  2. announcement/outbox/view/:announcementId  (announcement/outbox/view/072ba470-6816-11e8-a983-7f2bceabc273)

(Note : Incase of hard refresh of announcement details page,redirect to first page of respective announcement inbox/outbox list)