Bug 2039671 - Use navigation action IDs instead of destination IDs in AIFeatureMetadataDestination#257
Bug 2039671 - Use navigation action IDs instead of destination IDs in AIFeatureMetadataDestination#257fmasalha wants to merge 1 commit into
Conversation
… AIFeatureMetadataDestination
|
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, | |||
There was a problem hiding this comment.
Question. Did this work before? What is the difference between using the destination & using the navigation action id?
There was a problem hiding this comment.
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
) : AIFeatureMetadataDestinationIt 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.
There was a problem hiding this comment.
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.
|
Pull request closed by commit 7761aab |
… AIFeatureMetadataDestination r=segunfamisa https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=46707 Pull request: #257
… 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
https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=46707