PressForward / pressforward

PressForward is a free plugin that provides an editorial workflow for content aggregation and curation within the WordPress dashboard. It is designed for bloggers and editorial teams who wish to collect, discuss, and share content from a variety of sources on the open web.
GNU Affero General Public License v3.0
120 stars 22 forks source link

Links to internal Tools tabs do not work #1161

Closed boonebgorges closed 9 months ago

boonebgorges commented 1 year ago

Linking to internal Tools or Preferences tabs does not work. There seems to be a few problems:

  1. URLs are double-hashed, so they look like /wp-admin/admin.php?page=pf-options#top#user
  2. Even if you fix the double-hash wp-admin/admin.php?page=pf-options#site, it always loads #top#user

So you can't deep-link into these tabs.

boonebgorges commented 9 months ago

The issue here is the #top anchor. It's not clear from the commit logs, but it appears that this was added to ensure that when you navigate using the tabs, the window is brought back to the top. (Without #top, the scroll position puts the tabs at the very top of the window, so you're missing the top part of the screen.) So, I understand the motivation, but I suggest that using multiple URL hashes is not a semantic solution. Instead, let's add some JavaScript to keep track of the scroll location before and after the hash is set.

boonebgorges commented 9 months ago

Related: #1168