Skip to content
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

Rebuild and merge context menu code #4190

Merged
merged 37 commits into from
Mar 31, 2021

Conversation

winston-de
Copy link
Contributor

@winston-de winston-de commented Mar 21, 2021

Resolved / Related Issues

Itemize resolved / related issues by this PR.

Details of Changes
This is still a work in progress.

Goals:

ToDo:

Validation

How did you test these changes?

  • Built and ran the app
  • Tested the changes for accessibility

Screenshots (optional)

Add screenshots here.

@yaira2 yaira2 self-requested a review March 21, 2021 03:28
@lukeblevins lukeblevins self-requested a review March 21, 2021 17:50
@winston-de winston-de changed the title Merge context menus Rebuild and merge context menu code Mar 22, 2021
@winston-de
Copy link
Contributor Author

Alright, I got most of the basic menu items implemented.

Without & with shift held.
image

@yaira2
Copy link
Member

yaira2 commented Mar 26, 2021

@winston-de What still needs to be done? Also, it looks like the create shortcut option has the wrong icon.

@winston-de
Copy link
Contributor Author

@yaichenbaum I still have to add support custom font families for the glyphs (which is why the shortcut icon is wrong).
Also

  • Remove the ".Text" from the string resource keys
  • Add recycle bin items
  • Add the base layout flyout
  • Clean up/remove old context menu code in BaseLayout

@yaira2
Copy link
Member

yaira2 commented Mar 26, 2021

@winston-de Sounds like good progress, this will make maintaining the context menu so much easier!

@winston-de
Copy link
Contributor Author

@yaichenbaum I've updated all the localization keys (removed the ".Text"). Should I run the multilingual app toolkit?

@winston-de
Copy link
Contributor Author

winston-de commented Mar 27, 2021

I don't know what do do about the build error. It worked fine before I merged with main.
All it tells me is GENERATEPROJECTPRIFILE(0,0): Error : PRI175: 0x80073b0f - Processing Resources failed with error: Duplicate Entry. .
I've tried turning up verbose logging to the "diagnostic" level, but it still doesn't show anything about where this is happening.
I've tried manually looking through each of the resource files changed in the merge for duplicates.
If anyone can help me debug this, it would be greatly appreciated.

Fixed it.

@winston-de
Copy link
Contributor Author

winston-de commented Mar 30, 2021

@yaichenbaum Yes, there weren't any. I think the problem initially was that I was not changing all the keys, just then ones in the en-us file, so the compiler saw that as duplicate keys. Now that I'm changing them all, I can probably remove the 2s without any issue.

@winston-de
Copy link
Contributor Author

winston-de commented Mar 30, 2021

Ok, so I tried removing the 2 for one set of resources, and it built just fine. Then I removed them all, and the build failed with the duplicate error. I checked each resource key for duplicates, and didn't find any. I'm guessing one (or maybe more) of them is causing the problem for whatever reason, but I have no clue which one (except that it's not BaseLayoutContextFlyoutLayoutMode :) ).

@yaira2
Copy link
Member

yaira2 commented Mar 30, 2021

@winston-de Another possibility is that one of the resources are being used where they shouldn't and removing the .Text is throwing the error. The best solution I can think of for now is to go through each string one at a time.

@winston-de
Copy link
Contributor Author

@yaichenbaum That would take me hours to do, are the 2s really that bad? It works fine as it is. And if so, is it possible that I could come back and fix them in their own PR?

@winston-de
Copy link
Contributor Author

Also, @TyJOrtiz is it alright with you that I make the necessary changes to implement the new context menus in Column View?

@TyJOrtiz
Copy link
Contributor

@winston-de Yes that's fine

This also temporarily removes the context menus in column view
@yaira2
Copy link
Member

yaira2 commented Mar 30, 2021

@yaichenbaum That would take me hours to do, are the 2s really that bad? It works fine as it is. And if so, is it possible that I could come back and fix them in their own PR?

I don't want to cause all that extra work, how about keeping the new keys, but can you change the names of the new keys to something like RegularContextFlyout...? This will make it easier to search for the older keys and remove them in a future PR.

@winston-de
Copy link
Contributor Author

@yaichenbaum I can do that, but I don't see why you would to search through and remove the old keys, as they're gone. I changed the keys with find/replace throughout the entire solution so that the current translations wouldn't be lost.

@winston-de
Copy link
Contributor Author

The new context menus in Column View are up and running.
image

Btw, @TyJOrtiz the column view is awesome! :)

@yaira2
Copy link
Member

yaira2 commented Mar 30, 2021

@yaichenbaum I can do that, but I don't see why you would to search through and remove the old keys, as they're gone. I changed the keys with find/replace throughout the entire solution so that the current translations wouldn't be lost.

There is a duplicate key somewhere, I will try to find it.

@yaira2
Copy link
Member

yaira2 commented Mar 30, 2021

@winston-de It seems like the sort by "Date deleted" option is showing in all directories, additionally, the layout menu items seem to be disabled.

@winston-de
Copy link
Contributor Author

winston-de commented Mar 31, 2021

@yaichenbaum I can do that, but I don't see why you would to search through and remove the old keys, as they're gone. I changed the keys with find/replace throughout the entire solution so that the current translations wouldn't be lost.

There is a duplicate key somewhere, I will try to find it.

@yaichenbaum Thanks for doing this.
I searched every key for anything with the same name throughout the entire solution, and each one had somewhere between 37-54 references (which corresponds to the number of languages it was translated to). If there is a duplicate, I think it exists in only one resource file. I don't know if that's of any help to you.

@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Mar 31, 2021
@yaira2 yaira2 merged commit 9735858 into files-community:main Mar 31, 2021
@winston-de winston-de deleted the ContextMenus branch March 31, 2021 02:50
@winston-de
Copy link
Contributor Author

winston-de commented Mar 31, 2021

@yaichenbaum It looks like I may have never had to remove the ".Text" from everything.
I didn't realize it was possible to access them by using a slash, like this "resourcename/Text".GetLocalized().
I can change them all back if you'd prefer.

@yaira2
Copy link
Member

yaira2 commented Mar 31, 2021

@winston-de That sounds like a good idea.

@winston-de
Copy link
Contributor Author

@yaichenbaum I apologize for this, I just learned that the resources could be accessed like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
4 participants