mozilla / perfcompare

Improved Performance Comparison Tool
Mozilla Public License 2.0
39 stars 93 forks source link

Results Page: Allow users to change the page title of PerfCompare and have the title persist in the url #769

Open Carla-Moz opened 6 days ago

Carla-Moz commented 6 days ago

Description: As a user, I want to be able to change the title of PerfCompare and have the new title persist in the url, so that I can share the updated title with others.

Steps to Reproduce:

  1. Read the PerfCompare Documentation to get familiar with the app.
  2. Navigate to the title section of the PerfCompare results: ResultsPage
  3. Observe that there is currently no option to modify the title and have it persist in the URL.

image

Acceptance Criteria:

  1. The title should be editable by the user.
  2. The new title should persist in the URL so that it is retained after a page refresh.
  3. When a user shares the URL with others, the custom title should be displayed.
  4. The url should have the updated page title.

Hint! Check out this closed PR to help you out. Persist the search term in the url #724

FatumaA commented 6 days ago

Hi, I'd like to attempt this

Carla-Moz commented 6 days ago

@FatumaA, Please go ahead and try.

syedbarimanjan commented 5 days ago

@Carla-Moz what do you mean by the title?

hibaa03 commented 5 days ago

Hi! I've implemented functionality when I enter a custom title in the input field, it updates the URL correctly and when i refresh the page, it persists. If I share the URL, the custom title is displayed as intended and the title is in the URL as well, as for me locally it shows (http://localhost:3000/compare-results?baseRev=aa73934529cc8e33ed70fd861d70456fdf7f0818&baseRepo=try&framework=1&**title=updated+title**)

However, when navigating back to the Results page from the home page, the previously entered title is not retained, and the title reverts to a default value.

My question is, Is this behavior expected, or should the custom title persist across navigations? If it's expected to retain the custom title, what changes would be necessary?

syedbarimanjan commented 5 days ago

Hi! I've implemented functionality when I enter a custom title in the input field, it updates the URL correctly and when i refresh the page, it persists. If I share the URL, the custom title is displayed as intended and the title is in the URL as well, as for me locally it shows (http://localhost:3000/compare-results?baseRev=aa73934529cc8e33ed70fd861d70456fdf7f0818&baseRepo=try&framework=1&**title=updated+title**)

However, when navigating back to the Results page from the home page, the previously entered title is not retained, and the title reverts to a default value.

My question is, Is this behavior expected, or should the custom title persist across navigations? If it's expected to retain the custom title, what changes would be necessary?

Yes i think so that this is the expected behavior as stated here.

FatumaA commented 5 days ago

Hi Carla, I've linked my first attempt at this. Please let me know if that was what was meant and looking forward to your review

claire256 commented 4 days ago

Hello, @Carla-Moz ,What title are you referring to? Did you mean this? Screenshot from 2024-10-10 20-42-45

hibaa03 commented 4 days ago

@claire256 from what I know, this is what page title is image

claire256 commented 4 days ago

@hibaa03 , thanks.