-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(fixes #2872) Refactoring unused files for "showcase view whole nearby activity" #5870
base: main
Are you sure you want to change the base?
Conversation
app/src/main/res/values/strings.xml
Outdated
@@ -303,7 +303,7 @@ | |||
|
|||
<string name="about_translate_cancel">Cancel</string> | |||
<string name="retry">Retry</string> | |||
<string name="showcase_view_whole_nearby_activity">These are the places near you that need pictures to illustrate their Wikipedia articles.\n\nClicking on \'SEARCH THIS AREA\' locks the map and launches a nearby search around that location.</string> | |||
<string name="showcase_view_whole_nearby_activity">These are the places near you that need pictures to illustrate their Wikipedia articles.\n\nClicking on \'Search this area\' locks the map and launches a nearby search around that location.</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no "Search this area" button anymore.
Actually, is this string used somewhere? If you find where it is used, would you mind posting a screenshot?
Thanks a lot! 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that it was used in dialog_nearby.xml, but I believe the activity using the layout has been refactored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind trying to remove it? Any impact? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleting the button and its string seems fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Nicholas after further review I noticed that the dialog_nearby.xml file had no usages in the whole app. I’ve safely deleted the file along with its associated string resources, and the project still builds without issues.
It seems the file was part of the old webview in the nearby section of the contributions activity, likely from a version of the app prior to refactoring.
Description (required)
The refactored showcase nearby activity previously relied on a hardcoded string located in this file. This resulted in some inconsistency between the two activities.
Fixes #2872
What changes did you make and why?
While the best approach would be to parameterize the string with the key showcase_view_whole_nearby_activity to ensure consistency, the activity that previously utilized that layout has been removed. Consequently, the initial approach with the following pseudo-code is no longer applicable:
Parameterise the showcase string
Set the showcase string to use the search_this_area string
As a temporary workaround, I have edited the hardcoded string to ensure it aligns with the expected output from the search_this_area string and disabled the automatic capitalization flag in the button for consistency.
Tests performed (required)
Tested on ProdDebug on Pixel 9 with API level 34 to ensure consistency with the capitalization as shown in the following two screenshots.
Before the change:
After the change: