Skip to content

Use resource prefix for library resources #796

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

Merged
merged 16 commits into from
Jul 20, 2017

Conversation

WillieCubed
Copy link
Contributor

This fixes #794.

@@ -52,9 +52,9 @@ public void setUp() throws Exception {
context = mock(Context.class);
array = mock(TypedArray.class);

when(array.getFloat(R.styleable.SpacedEditText_spacingProportion, 1)).thenReturn
when(array.getFloat(R.styleable.fui_SpacedEditText_fui_spacingProportion, 1)).thenReturn
Copy link
Contributor

Choose a reason for hiding this comment

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

Any idea why this one go a double fui?

Copy link
Contributor Author

@WillieCubed WillieCubed Jul 11, 2017

Choose a reason for hiding this comment

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

I think that's an effect of the build tools appending the two resource names together. I'll make sure it's reduced to SpacedEditText_fui_spacingProportion, if that's okay.

@@ -27,21 +29,21 @@
public abstract class FirebaseListAdapter<T> extends BaseAdapter implements FirebaseAdapter<T> {
private static final String TAG = "FirebaseListAdapter";

protected final Activity mActivity;
protected final Context mContext;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we remove the DB changes since they aren't related to this PR? Otherwise LGTM! 😀

Copy link
Contributor

Choose a reason for hiding this comment

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

I think those will be fixed after the merge conflicts are fixed, those changes have already been accepted in another PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@samtstern yeah, once I saw the conflicts I realized this PR was built using personal commits instead of dev. Hopefully it won't be too tough to resolve them! 😀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'm still learning how to use git. Will do.

@@ -38,7 +38,7 @@
private String[] sections;

public CountryListAdapter(Context context) {
super(context, R.layout.dgts__country_row, android.R.id.text1);
super(context, R.layout.fui_dgts__country_row, android.R.id.text1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

While we're renaming, might as well remove that extra _.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

@SUPERCILEX
Copy link
Collaborator

@TheCraftKid might I also suggest you try branching? 😂 Nah, I'm just kidding with you but you should always try starting a PR by checking out a fresh version of upstream/dev, or in this case the 2.1 dev branch. Otherwise you end up with a whole bunch of conflicts and unrelated change like that DB stuff. Best of luck resolving those conflicts! 😀

@samtstern
Copy link
Contributor

@TheCraftKid we're getting close to 2.1.0 and I am happy to include this in the release if you have time to finish it in the next day or two. What do you think? If you have any questions or need some help just let me know.

@WillieCubed
Copy link
Contributor Author

Yep, sorry about the delay; a Windows update messed up my desktop environment.

On a side note, I learned how to use branches and remove the irrelevant code to this PR. Is there a way for me to add my commits to this PR, or will I have to make a new one?

@samtstern
Copy link
Contributor

@TheCraftKid just commit again and push to the same branch, the PR will update like magic.

@WillieCubed
Copy link
Contributor Author

Wow, that took way too long. That updated like magic, all right. I'm really sorry if there are some screwy commits or anything else in this PR.

Final note: just to get the linter to stop complaining, I added tools:ignore="ResourceName" to the root of the strings.xml file. Just making sure this is okay.

@SUPERCILEX
Copy link
Collaborator

SUPERCILEX commented Jul 15, 2017

@TheCraftKid glad you pulled through!!! 😀

I hate to be the bearer of bad news again, but the issue you're trying to resolve—#794—is about the string res names, not the layouts. We definitely should keep the layout name changes (thanks!), but the styles.xml file should have a root res name prefix ignore tag instead of the string res which should each have the prefix. More work for you, sorry! 😊

@@ -1,4 +1,4 @@
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should also ignore at root here.

@WillieCubed
Copy link
Contributor Author

Okay, that should solve the issues @SUPERCILEX brought up.

@samtstern
Copy link
Contributor

@TheCraftKid we still have a ton of merge issues though, you need to merge the firebase version-2.1.0-dev branch into your branch and then resolve all conflicts.

@samtstern
Copy link
Contributor

@TheCraftKid most of these conflicts are my fault I will send a PR to your branch that will fix it.

Change-Id: Ib9f64e94983cb39e70a03b526be9bb25ead888d1
@samtstern
Copy link
Contributor

samtstern commented Jul 17, 2017

Opened WillieCubed#1 which will fix it.

Here's an issue though: because this adds the fui_ prefix to all of the strings it messes up all of the translations. Obviously I could just add the fui_ prefix to all of our translated strings as well but the problem is in the translation portal we use the string name is used as a unique ID so I'm actually not sure how it would react to this refactoring.

Since the major goal of 2.1.0 was to get translations out I am concerned about how this PR affects it. I'd like to punt this to 2.1.1 so I can think about the implications of adding this prefix.

@TheCraftKid
@SUPERCILEX

what do you think?

@WillieCubed
Copy link
Contributor Author

I'd be willing to keep v2.1.0 translation-based and move the resource name changes to v2.1.1 if that means we can push the essential v2.1.0 changes.

@samtstern
Copy link
Contributor

@TheCraftKid thanks for your flexibility, I think that's the safest move. I definitely want to get your resource prefix change in ASAP after 2.1.0 though, it's the right thing to do for developers.

@samtstern
Copy link
Contributor

Woot no more conflicts! The build is failing now but that's working as intended since we have not answered the translation question yet.

Change-Id: I7f7f848941c6482bf444dd743a05acc78aa0455c
Change-Id: I5dadda6cbe361ef756c4d3ba3525ca3eb76925d0
Change-Id: Iac2405e6a11ee35fb8d0c05afce35d8fa4315321
@samtstern
Copy link
Contributor

@TheCraftKid I opened WillieCubed#2 to fix the final issues.

@samtstern samtstern changed the base branch from version-2.1.0-dev to version-2.1.1-dev July 20, 2017 20:29
@samtstern
Copy link
Contributor

@TheCraftKid nice! This one is all set to merge, thanks for the hard work.

@samtstern samtstern merged commit 0f55407 into firebase:version-2.1.1-dev Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants