Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

History fixes and misc about page fixes #5600

Merged
merged 1 commit into from
Nov 15, 2016
Merged

History fixes and misc about page fixes #5600

merged 1 commit into from
Nov 15, 2016

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Nov 14, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

redo of #5559

NOTE: I thought I had fixed the history issues with this, but I was wrong. I removed the issues I thought I had fixed from this PR


Auditors: @cezaraugusto, @darkdh, @bbondy


Remove unnecessary/broken/useless context menu items for about pages

Fixes #4812


Update icon for about pages to fa-list (except for about:newtab)

Fixes #5497

Auditors: @bradleyrichter

Test Plan:

  1. Launch Brave and visit about:about
  2. Open each of the links and confirm it's the fa-list icon

Screenshots

Here's one showing:

  • fixing the casing on component names in about:brave
  • new "fa-list" urlbar icon
  • context menu has items removed from about pages
    • save as
    • print
    • view source
    • inspect element

screen shot 2016-11-11 at 5 13 56 pm

- History code was refactored
  - one step forward with regard to #3502
  - session helper created for aboutHistory (tests added)
  - history specific methods broke out into historyUtil (tests added)
  - history stores it's data in AppStore.about.history (similar structure to new tab code)

- about:history is only updated when something changed
  - # calls to render on about:history is drastically reduced (should fix #5382; please reopen if not)

- about:brave text update
Implements followup feedback for #5436 (comment)

Auditors: @cezaraugusto, @darkdh

Test Plan:
1. Launch Brave and go to about:history
2. With history open, open a new tab and visit a site you have never been to before (hint: just append #1234567 to the end of URL)
3. Switch back to history tab and confirm entry shows
4. Open another new tab; in the URL bar, type an entry for a site you HAVE been to before (which shows in the autocomplete)
5. Instead of hitting enter, pick the URL from the autocomplete drop down (use arrow keys and press enter,  OR  click)
6. Visit about:history again and confirm this entry shows
7. On about:history, click some of the entries. They should show their selection status in a faster manner than before

Advanced test notes:
- After exiting Brave, you can view the session file to confirm the details used in about:history and about:brave are removed and NOT stored to disk

-----

Remove unnecessary/broken/useless context menu items for about pages

Fixes #4812

-----

Update icon for about pages to fa-list (except for about:newtab)

Fixes #5497

Auditors: @bradleyrichter

Test Plan:
1. Launch Brave and visit about:about
2. Open each of the links and confirm it's the `fa-list` icon
@bsclifton
Copy link
Member Author

Comment per @bradleyrichter in last thread:

It looks like our icons are riding high for some reason. But this will look nice.

(I'll look at fixing that up 😄 )

sites = makeImmutable(sites) || new Immutable.List()
return sites.filter((site) => siteUtil.isHistoryEntry(site))
.sort(sortTimeDescending)
.slice(0, aboutHistoryMaxEntries)
Copy link
Member Author

@bsclifton bsclifton Nov 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: fix from a9c3304 was kept here when rebasing 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

assert.deepEqual(result.toJS(), expectedResult)
})
it('only returns `historyUtil.maxEntries` results', function () {
let tooManyEntries = new Immutable.List().push(historyDayOne)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: this needs to check the order they're in

@bbondy
Copy link
Member

bbondy commented Nov 15, 2016

I think it looks good. I also asked @darkdh to take a look and those can be done in followups if he has comments.

@bbondy bbondy merged commit d86d963 into brave:master Nov 15, 2016
@bsclifton bsclifton deleted the showing-history-some-love branch November 16, 2016 08:02
@darkdh
Copy link
Member

darkdh commented Nov 16, 2016

lgtm, ++

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.