osuosl / streamwebs

Streamwebs.org website
http://streamwebs.readthedocs.io/
4 stars 1 forks source link

Fixed back button glitch #663

Open jerry-peng opened 6 years ago

jerry-peng commented 6 years ago

fixes issue #656 Tested on: Chrome, Firefox, Safari (desktop & iphone), Edge

Changes in this PR.

Testing this PR.

  1. Go to site page

  2. Go to a site with a lot of datasheet and gallery data (might need to manually add them)

  3. Click on the page number for both datasheet and gallery, and check the url in the browser. Make sure the change according to the page number clicked. Important: The url parameter should be: "..../site_name/?datasheet={1}&gallery={2}" where {1} is the datasheet page number, and {2} is gallery page number. For each parameter in the url (datasheet/gallery), if the page number is 1, it should not appear.

  4. Click "back" or "forward" button on browser repeatedly, make sure the page number you clicked are stored in history.

  5. Manually input a test url to that specific site into browser, with different page numbers for each parameter (Make sure to test page numbers that are out of range). If the page number is out of range in url, the datasheet/gallery table page should load page number 1.

  6. Make sure the rest of the page's functionality are not affected.

Expected Output.

  1. The url changes according to the page number clicked.
  2. Clicking "back" "forward" button in browser, the page number are stored and works properly.
  3. Manually inputting url with invalid page number, and the page numbers are not affected and page number 1 is highlighted.
    $ make test
    [... test output ...]

@osuosl/devs