Skip to content

Bug 2039671 - Use navigation action IDs instead of destination IDs in AIFeatureMetadataDestination#257

Closed
fmasalha wants to merge 1 commit into
mozilla-firefox:autolandfrom
fmasalha:useActionNav
Closed

Bug 2039671 - Use navigation action IDs instead of destination IDs in AIFeatureMetadataDestination#257
fmasalha wants to merge 1 commit into
mozilla-firefox:autolandfrom
fmasalha:useActionNav

Conversation

@fmasalha
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

View this pull request in Lando to land it once approved.

@@ -36,11 +36,11 @@ data class Destination(val id: Int, override val label: Int) : AIFeatureMetadata
*/
val AIFeatureMetadata.destination: AIFeatureMetadataDestination? get() = when (id) {
PageSummaryFeature.id -> Destination(
id = R.id.pageSummariesSettingsFragment,
id = R.id.action_aiControlsFragment_to_pageSummariesSettingsFragment,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question. Did this work before? What is the difference between using the destination & using the navigation action id?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

while I don't think this would help us here, but to prevent the possibility of adding an unexpected type of "int",

could we add something like this in Destination

data class Destination(
  @param:IdRes val id: Int, 
  @param:StringRes override val label: Int
) : AIFeatureMetadataDestination

It wouldn't help us here, because both R.id.pageSummariesSettingsFragment and R.id.action_... are both id resources, but the string one can help us avoid future issues there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Question. Did this work before? What is the difference between using the destination & using the navigation action id?

From my understanding, putting in the defined action uses the xml action defined with the animation that most of the rest of settings uses. Before it was just doing a navigation to the fragment rather than using the navgraph. We originally had it using the actions but I believe it switched when we moved the nav link to the metadata class.

@lando-worker
Copy link
Copy Markdown

lando-worker Bot commented May 19, 2026

Pull request closed by commit 7761aab

@lando-worker lando-worker Bot closed this May 19, 2026
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request May 20, 2026
… AIFeatureMetadataDestination r=segunfamisa

https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=46707

Pull request: mozilla-firefox/firefox#257

UltraBlame original commit: 1b957771bf267ad8afe479fb3fd1fdd8e7a0e279
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants