Commit Graph

132 Commits

Author SHA1 Message Date
Marco Bonardo
c23719eb3b Bug 1904909 - PlacesUtils::GatherDataText and GatherDataHtml should not recurse into queries r=daisuke,places-reviewers
There's a few problems in the code gathering text data for nodes.
First it should not recurse into queries (included folder shortcuts) as it's
easy to create infinite recursion with them. The first level is excluded though,
as otherwise it would not be possible to copy contents of left pane roots.
Second it should requery folder shortcut contents in excludeItems results,
as otherwise it's not possible to copy contents of a root as text.
There's no longer the risk of dragging around root folders as this code is only
used for text flavors today, drag&drop uses serializeNode instead.

Differential Revision: https://phabricator.services.mozilla.com/D215068
2024-07-02 13:45:37 +00:00
Daisuke Akatsuka
7a73f5cf79 Bug 1845042: Make editing tags feature when adding multiple bookmarks r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D212393
2024-06-18 21:00:07 +00:00
Norisz Fay
2a03c567e1 Backed out changeset b037b47fd062 (bug 1845042) for causing bc failures on browser_bookmark_current_tabs.js CLOSED TREE 2024-06-18 09:36:24 +03:00
Daisuke Akatsuka
d28b1b2c32 Bug 1845042: Make editing tags feature when adding multiple bookmarks r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D212393
2024-06-17 20:52:42 +00:00
Mark Banner
82e3203f19 Bug 1864821 - Replace PromiseUtils.defer() with Promise.withResolvers() in browser window scopes. r=Gijs,extension-reviewers,application-update-reviewers,rpl,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D197486
2024-01-05 09:22:33 +00:00
Anna Yeddi
a6f3278227 Bug 1867053 - Add an accessible name to the tree view on the Bookmark panel r=places-reviewers,fluent-reviewers,Jamie,bolsson,Standard8
The Bookmark overlay panel includes a tree view for the [editBMPanel_folderTree](https://searchfox.org/mozilla-central/source/browser/components/places/content/bookmarksSidebar.xhtml#59-69) which is programmatically not labeled.

We are adding an `aria-label` to provide an accessible name for this `<tree>` for assistive technology.

Reference: [ARIA Design pattern for Tree view](www.w3.org/WAI/ARIA/apg/patterns/treeview/#wai-ariaroles,states,andproperties)

Differential Revision: https://phabricator.services.mozilla.com/D194888
2023-12-01 21:13:01 +00:00
Jonathan Sudiaman
f1ebf868a9 Bug 1860556 - Webpages are not saved to Bookmarks Toolbar if another location was selected before r=mak,places-reviewers
https://treeherder.mozilla.org/jobs?repo=try&revision=ae6aadeda8f2a6efc927a47a271797ca60e1083d

Differential Revision: https://phabricator.services.mozilla.com/D191694
2023-10-24 13:03:10 +00:00
Jonathan Sudiaman
1859ecc92c Bug 1855218 - Regression: "Show all the bookmarks folders" button resets changes to Location dropdown in bookmarking pane r=mak,places-reviewers
Fix bookmarks regression and add a test case. Also simplified the test file to use a single window. (New window is no longer required, now that we don't allow flipping between delayed/instant apply.)

https://treeherder.mozilla.org/jobs?repo=try&revision=8fd198b49afb038c1944d9ccccedbbe06d463517

Differential Revision: https://phabricator.services.mozilla.com/D189658
2023-10-03 16:04:13 +00:00
Gregory Pappas
a57c4f9405 Bug 1845311 - [Part 2] Use ChromeUtils.defineLazyGetter in more places r=arai,webcompat-reviewers,necko-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,sync-reviewers,anti-tracking-reviewers,tabbrowser-reviewers,bytesized,twisniewski,sgalich,mak,kershaw,sclements,pbz,robwu,geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D184623
2023-08-01 23:01:02 +00:00
Daisuke Akatsuka
2bf471ef0b Bug 1829580: Remove nsNavHistory::VisitIdToResultNode() r=mak
Differential Revision: https://phabricator.services.mozilla.com/D183337
2023-07-25 22:47:59 +00:00
Karandeep
eaf5c7d8a6 Bug 1836986 - Hide tags field in the Star ("Bookmark this page") panel when the user has no tags. r=dao,mak
Differential Revision: https://phabricator.services.mozilla.com/D181557
2023-06-25 11:19:13 +00:00
Marco Bonardo
761a9aa462 Bug 1816901 - Stop using promiseItemId in product code. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D180410
2023-06-24 07:16:51 +00:00
Gijs Kruitbosch
3c6e3c3cab Bug 1838632 - fix edit bookmarks dialog's use of non-standard fluent attributes to use more straightforward switches between messages, r=jsudiaman,fluent-reviewers,flod
Depends on D181229

Differential Revision: https://phabricator.services.mozilla.com/D181230
2023-06-19 16:30:16 +00:00
Katherine Patenio
99d830d71b Bug 1830418 - Convert browser/components/customizableui/CustomizableUI.jsm to ESM r=Standard8,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D177423
2023-05-24 15:52:34 +00:00
Mark Banner
0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Jonathan Sudiaman
9fd065c778 Bug 1820979 - Remove instant apply bookmarks panels code r=mak
Remove the `browser.bookmarks.editDialog.delayedApply.enabled` pref, and for all usages in conditional branches, assume that it is `true`. (Since we want to be using delayed apply logic going forward.)

`delayed_apply` spinoffs of tests are removed and merged with their instant apply counterparts. The only test removed without a corresponding spinoff is `browser_editBookmark_tags_liveUpdate.js`. That test is checking whether tags are updated in the edit dialog, if they are updated from a different place. The problem is that we don't really want this behavior anymore. It was previously set to only run with `browser.bookmarks.editDialog.delayedApply.enabled` set to `false`, but now that it's no longer configurable, it made most sense to simply get rid of this test.

https://treeherder.mozilla.org/jobs?revision=c0741eca62212a75a9dd52fc2c5c2b6c34f9f2d7&repo=try

Differential Revision: https://phabricator.services.mozilla.com/D176370
2023-05-09 21:03:19 +00:00
Eemeli Aro
db51c0f57f Bug 1830042 - Migrate detailsPane.noItems and detailsPane.itemsCountLabel strings to Fluent. r=mak,fluent-reviewers,flod
This also allows dropping the PlacesUIUtils getFormattedString() and getPluralString() functions as unused

Depends on D176643

Differential Revision: https://phabricator.services.mozilla.com/D176644
2023-05-02 18:34:41 +00:00
Emilio Cobos Álvarez
2d3579a0ff Bug 1823088 - Fix flex-basis in the edit bookmark panel. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D172900
2023-03-20 11:36:28 +00:00
Jonathan Sudiaman
c993969b7b Bug 1820349 - Intermittently, the editbookmark dialogue won't appear when the star button is clicked r=mak
Avoid breaking if `window.arguments[0]` is `null`.

https://treeherder.mozilla.org/jobs?repo=try&revision=4875199ca6018fd8c9557b90c3d1ebda75765488

Differential Revision: https://phabricator.services.mozilla.com/D171758
2023-03-08 13:34:34 +00:00
Jonathan Sudiaman
243163addc Bug 1812083 - Enable delayed apply bookmarks in Firefox Nightly r=mak
As expected, the try job flagged a bunch of test failures when flipping the default `delayedApply` pref to `true`. Some of these failures are legitimate issues:

  - When creating a new folder in the tree under "Location", renaming the folder doesn't update its name in the Location field.
  - When right clicking a bookmark in the sidebar, and creating a new folder, the folder doesn't get placed before the bookmark, i.e. the insertion point is ignored.

And as you pointed out, tags were being wiped out on blur in the Star/Toolbar panels. These issues have been fixed. The rest of the failures have been fixed in one of these ways:

  - Update the test to pass regardless of `delayedApply` setting. This was the preferred method.
  - Force the test to use instant apply. This was only done for tests that have an existing delayed apply counterpart.
  - Force the entire test suite to use instant apply. This was only done for one file, namely `browser_bookmark_popup.js`. I'll file a bug to spin off a delayed apply version of this suite.

try job with `delayedApply` enabled: https://treeherder.mozilla.org/jobs?repo=try&revision=50e9cdb65feaec07c9519e928caf62042c3df9a4
try job with `delayedApply` disabled: https://treeherder.mozilla.org/jobs?repo=try&revision=1102b5076a79bf08a0e4b073fdf369af97a16ef7

Differential Revision: https://phabricator.services.mozilla.com/D168690
2023-02-24 00:29:57 +00:00
Butkovits Atila
0487e7778e Backed out changeset 4b449f3b2ab0 (bug 1812083) for causing failures complaining about bookmarks. CLOSED TREE 2023-02-23 16:27:23 +02:00
Jonathan Sudiaman
bdad7c3589 Bug 1812083 - Enable delayed apply bookmarks in Firefox Nightly r=mak
As expected, the try job flagged a bunch of test failures when flipping the default `delayedApply` pref to `true`. Some of these failures are legitimate issues:

  - When creating a new folder in the tree under "Location", renaming the folder doesn't update its name in the Location field.
  - When right clicking a bookmark in the sidebar, and creating a new folder, the folder doesn't get placed before the bookmark, i.e. the insertion point is ignored.

And as you pointed out, tags were being wiped out on blur in the Star/Toolbar panels. These issues have been fixed. The rest of the failures have been fixed in one of these ways:

  - Update the test to pass regardless of `delayedApply` setting. This was the preferred method.
  - Force the test to use instant apply. This was only done for tests that have an existing delayed apply counterpart.
  - Force the entire test suite to use instant apply. This was only done for one file, namely `browser_bookmark_popup.js`. I'll file a bug to spin off a delayed apply version of this suite.

try job with `delayedApply` enabled: https://treeherder.mozilla.org/jobs?repo=try&revision=50e9cdb65feaec07c9519e928caf62042c3df9a4
try job with `delayedApply` disabled: https://treeherder.mozilla.org/jobs?repo=try&revision=1102b5076a79bf08a0e4b073fdf369af97a16ef7

Differential Revision: https://phabricator.services.mozilla.com/D168690
2023-02-23 13:05:50 +00:00
Butkovits Atila
bd80e99e24 Backed out changeset 8107b1fc07e0 (bug 1812083) for causing failures at browser_bookmarks_change_url.js. CLOSED TREE 2023-02-17 07:14:36 +02:00
Jonathan Sudiaman
2a43ccaee5 Bug 1812083 - Enable delayed apply bookmarks in Firefox Nightly r=mak
As expected, the try job flagged a bunch of test failures when flipping the default `delayedApply` pref to `true`. Some of these failures are legitimate issues:

  - When creating a new folder in the tree under "Location", renaming the folder doesn't update its name in the Location field.
  - When right clicking a bookmark in the sidebar, and creating a new folder, the folder doesn't get placed before the bookmark, i.e. the insertion point is ignored.

And as you pointed out, tags were being wiped out on blur in the Star/Toolbar panels. These issues have been fixed. The rest of the failures have been fixed in one of these ways:

  - Update the test to pass regardless of `delayedApply` setting. This was the preferred method.
  - Force the test to use instant apply. This was only done for tests that have an existing delayed apply counterpart.
  - Force the entire test suite to use instant apply. This was only done for one file, namely `browser_bookmark_popup.js`. I'll file a bug to spin off a delayed apply version of this suite.

try job with `delayedApply` enabled: https://treeherder.mozilla.org/jobs?repo=try&revision=50e9cdb65feaec07c9519e928caf62042c3df9a4
try job with `delayedApply` disabled: https://treeherder.mozilla.org/jobs?repo=try&revision=1102b5076a79bf08a0e4b073fdf369af97a16ef7

Differential Revision: https://phabricator.services.mozilla.com/D168690
2023-02-17 03:57:03 +00:00
Butkovits Atila
552356e774 Backed out changeset 26989b0e17cc (bug 1812083) for causing failures at browser_bookmark_popup.js. CLOSED TREE 2023-02-16 20:36:42 +02:00
Jonathan Sudiaman
31bd79658d Bug 1812083 - Enable delayed apply bookmarks in Firefox Nightly r=mak
As expected, the try job flagged a bunch of test failures when flipping the default `delayedApply` pref to `true`. Some of these failures are legitimate issues:

  - When creating a new folder in the tree under "Location", renaming the folder doesn't update its name in the Location field.
  - When right clicking a bookmark in the sidebar, and creating a new folder, the folder doesn't get placed before the bookmark, i.e. the insertion point is ignored.

And as you pointed out, tags were being wiped out on blur in the Star/Toolbar panels. These issues have been fixed. The rest of the failures have been fixed in one of these ways:

  - Update the test to pass regardless of `delayedApply` setting. This was the preferred method.
  - Force the test to use instant apply. This was only done for tests that have an existing delayed apply counterpart.
  - Force the entire test suite to use instant apply. This was only done for one file, namely `browser_bookmark_popup.js`. I'll file a bug to spin off a delayed apply version of this suite.

try job with `delayedApply` enabled: https://treeherder.mozilla.org/jobs?repo=try&revision=50e9cdb65feaec07c9519e928caf62042c3df9a4
try job with `delayedApply` disabled: https://treeherder.mozilla.org/jobs?repo=try&revision=1102b5076a79bf08a0e4b073fdf369af97a16ef7

Differential Revision: https://phabricator.services.mozilla.com/D168690
2023-02-16 17:31:49 +00:00
Jonathan Sudiaman
8d20bcc639 Bug 1801871 - Update Bookmark Star panel to use editBookmark.js r=mak,Standard8
Enable delayed apply logic for the star panel. Refactor some existing code using async/await rather than `catch()` everywhere.

https://treeherder.mozilla.org/jobs?revision=fb6ba9ef08f132c72b6c2918067fc3db54a94650&repo=try

Differential Revision: https://phabricator.services.mozilla.com/D166237
2023-01-30 20:10:46 +00:00
Jonathan Sudiaman
da10d65d67 Bug 1808768 - Bookmarks manager shows duplicate tags in the input field r=mak
Query the database for the deduped set of tags. Similar to the logic used in `instantEditBookmark.js`.

Differential Revision: https://phabricator.services.mozilla.com/D167195
2023-01-24 15:55:33 +00:00
Mark Banner
774d70b85f Bug 1808400 - Handle cases of .then(foo, Cu.reportError) in ESLint rule no-cu-reportError. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D167520
2023-01-23 18:09:04 +00:00
Mark Banner
2bd093b567 Bug 1811334 - Automatically replace Cu.reportError with console.error (most of browser/components). r=settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D167297
2023-01-20 17:49:21 +00:00
Jonathan Sudiaman
51d9315f94 Bug 1801869 - Update Bookmarks Library panel to use editBookmark.js r=mak
Ensure that we can safely load `editBookmark.js` as the `gEditItemOverlay` instance without breaking the library panel. As the library does not currently support OK/Cancel operation, this does not perform any "delayed apply" logic, we simply save on blur as usual.

The tricky part was getting bulk tagging to work. With the current design of the `BookmarkState` class, it only supports modifying a **single** bookmark, and it will break when trying to add a tag to multiple bookmarks at once. This is where we left off with the previous revision... I believe in this case, it makes sense to simply revert back to the logic we had in `instantEditBookmark.js` to perform the bulk tag operation.

https://treeherder.mozilla.org/jobs?repo=try&revision=a1f58a770b16edd519da6e0d55e2f3c529d8f8de

Differential Revision: https://phabricator.services.mozilla.com/D164250
2023-01-05 18:20:13 +00:00
Marco Bonardo
3b8f1a3fd8 Bug 1457131 - Remove itemId (aka parentId) from PlacesInsertionPoint. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D165767
2023-01-04 13:16:08 +00:00
Jonathan Sudiaman
0474a395b9 Bug 1786322 - Re-design bookmark detail pane to be a fixed height r=mak,desktop-theme-reviewers,dao
Expand default height of the library details pane and move form labels over to the side.

{F4246935}

Try Job: https://treeherder.mozilla.org/jobs?revision=c164cc6dc37b0ad3242ba1bb43ccb6f1ead1507c&repo=try

Differential Revision: https://phabricator.services.mozilla.com/D161521
2022-12-07 23:47:38 +00:00
Jonathan Sudiaman
c852446411 Bug 1747699 - Re-write bookmarks and folder creation for new non-instant apply pattern r=mak,Standard8
Based on https://phabricator.services.mozilla.com/D141582. Updates the bookmark toolbar to delay creating new bookmarks and folders while "delayed apply" mode is enabled.

One edge case which is not currently accounted for, is the case where user clicks on "Bookmark All Tabs", and then creates folders from within the dialog box, for example:

{F4228947}

In this case, the new folders will be created instantly, even if delayed apply is enabled. Cancelling the dialog box will remove them. (This is why we still need to use "batching", even in delayed apply mode.)

Because of how the dialog is currently structured, it seems fairly complex to handle this case. I am not sure if it is within the scope of this project, open to advice.

Differential Revision: https://phabricator.services.mozilla.com/D160554
2022-11-22 14:35:05 +00:00
trickypr
fd6c774999 Bug 1510561 - Part 3: Apply plugin:mozilla/require-jsdoc to browser/components/places. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D159468
2022-10-24 13:32:36 +00:00
Emilio Cobos Álvarez
2bb0c138c8 Bug 1796179 - Use height rather than XUL attributes for edit bookmark popup's folder tree. r=mstriemer,dao
Differential Revision: https://phabricator.services.mozilla.com/D159720
2022-10-20 13:18:28 +00:00
trickypr
02afbf3322 Bug 1510561 - Part 2: Apply plugin:mozilla/valid-jsdoc to browser/components/places. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D158562
2022-10-13 10:55:28 +00:00
Masayuki Nakano
3ee9858ad2 Bug 1792759 - part 1: Add nsIEditor.clearUndoRedo() to get rid of nsIEditor.transactionManager r=m_kato,NeilDeakin,Standard8
`nsIEditor.transactionManager` is used only for some simple purposes, however,
`nsIEditor` exposes the rich API.  That makes it harder to maintain internal
code around transactions.  Instead, `nsIEditor` exposes only simple and
necessary APIs.

This patch creates a new API to clear undo/redo history and make the users in
mozilla-central use it instead of using `nsITransactionManager.clear()`.

Differential Revision: https://phabricator.services.mozilla.com/D158336
2022-10-09 01:13:49 +00:00
Mark Banner
d026f430f6 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 22:34:21 +00:00
smolnar
ee079d37e2 Backed out 8 changesets (bug 1779982, bug 1780017, bug 1780347) for causing doc generate failures. CLOSED TREE
Backed out changeset 3f22c0f99cf1 (bug 1780347)
Backed out changeset 6f20b7e4b21b (bug 1780017)
Backed out changeset ae6062c69aeb (bug 1780017)
Backed out changeset e668d7778d97 (bug 1780017)
Backed out changeset e158fc41594b (bug 1780017)
Backed out changeset d4c69c956271 (bug 1779982)
Backed out changeset 145212fd826d (bug 1779982)
Backed out changeset 54079aaa1857 (bug 1779982)
2022-07-20 22:43:53 +03:00
Mark Banner
8715b062f5 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 15:50:40 +00:00
Iulian Moraru
bc13570de5 Backed out 7 changesets (bug 1779982, bug 1780017) for causing multiple failures. CLOSED TREE
Backed out changeset f33a58aa2f3f (bug 1780017)
Backed out changeset e21c85d61b91 (bug 1780017)
Backed out changeset 213ee5578e7c (bug 1780017)
Backed out changeset ea9b3bf42ea1 (bug 1780017)
Backed out changeset d2d8530f3c4d (bug 1779982)
Backed out changeset 088e5148c307 (bug 1779982)
Backed out changeset 267e08f3868a (bug 1779982)
2022-07-20 15:44:53 +03:00
Mark Banner
2bd76952c1 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 10:36:49 +00:00
Tooru Fujisawa
328d63ce7f Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel
f009ba2983 Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa
bf0a8b781b Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa
48c568867c Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
James Teow
d99404900f Bug 1760637 - Upgrade initPanel in instantEditBookmark.js to async r=mak
In addition to adding async/await, I also added early return statements
when we know initialization is occuring again, or if there is evidence
that it has been uninitialized.

A concrete example of this would be from the Library, where clicking on
on a folder/category on the left will run initPanel at the same time as
the highlighted folder/bookmark on the right changes (also runs initPanel).

Differential Revision: https://phabricator.services.mozilla.com/D141800
2022-05-17 00:32:48 +00:00
Evgenia Kotovich
cd45049954 Bug 1747689: Changed browser_bookmarkProperties_editTagContainer.js to pass with editBookmark.js. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D138986
2022-03-21 15:54:44 +00:00
Evgenia Kotovich
e3f6268b2e Bug 1747689 - Saving bookmarkState and passing to PlaceUIUtils for perform changes. r=mak,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D137234
2022-02-24 10:07:39 +00:00