fernandreu / office-ribbonx-editor Goto Github PK
View Code? Open in Web Editor NEWAn overhauled fork of the original Custom UI Editor for Microsoft Office, built with WPF
License: MIT License
An overhauled fork of the original Custom UI Editor for Microsoft Office, built with WPF
License: MIT License
When I have to insert icons into a project's Custom UI, there are usually quite a few icons. I sure would like to be able to select more than one at a time in the Insert Icons dialog. Now I have to select one, click OK, then click the Insert Icons icons again, and try to remember which one I just inserted so I don't inadvertently insert it twice.
The old Custom UI Editor must have allowed this, or I would not have felt the pain using this otherwise great new version.
So my request specifically is to set MultiSelect = True for the Insert Icons dialog, so that multiple icons can be selected and therefore inserted in one trip to the dialog.
Previous dialog had a separate button to show this list. Instead, use an editable DropDown control.
There is probably no need to persist this list between sessions.
Related to #36.
Right now, both the assembly version and the GitHub tag created for a release may not coincide, which can lead to some confusion (i.e. GitHub releases page might say a version in the title which is different to the actual version of the tool).
Triggering a release through a tag push still seems like the most convenient solution, which would mean that the assembly should update based on that tag. However, SharedAssemblyInfo.cs
will still need to be updated manually in the repository, so there isn't much value in that.
The opposite solution would be triggering a release when a newer assembly version is detected, at which point the tag is automatically created. However, there can always be some pre-release builds with a higher version number, and hence this solution does not seem ideal either.
Based on that, it seems the simplest / most ideal solution would simply be detecting conflicts between these two versions in a pre-build step, and fail the build (i.e. exit 1
) in such cases.
Describe the bug
When trying to save a document that is already opened in Excel, the program crashes.
To Reproduce
Steps to reproduce the behavior:
Reload on Save
enabledExpected behavior
This should just show an error message saying the document is in use.
Context
This happened on Windows 7 and Excel 2010.
I thought this was already taken care of, but apparently not. Moving forward, I will need to write some tests about this, as it is quite an critical thing to occur.
The easiest thing for this would be adding a useful link pointing to a website such as:
This could be done by checking the last date modified or the checksum of the file at the time it is opened and before being saved.
However, doing those checks might prove as costly as simply opening the file again, so there might not be a noticeable benefit.
ScintillaNET allows easy development of advanced features which are not implemented yet. A few examples:
If a document is about to be saved with the Reload on Save
option disabled, the editor could detect whether the file that was modified externally since it was opened in the editor (e.g. by looking at the date modified). If so, a preemptive warning message with accept / cancel actions would be good to avoid surprises.
If the Reload on Save
option is enabled, no issues should occur, and hence there is no need for a warning message.
The method of detecting external document changes can be applied to #2 as well.
The idea is that, when pressing enter, the new line appears with the exact same number of leading spaces / tabs as the previous line. This behaviour is common to many IDEs, and should not require XML parsing, so it should be easy to implement.
To suit everybody, this behaviour could be toggled in settings.
This should be done at least for non-empty XML files, where you are potentially losing data not saved elsewhere.
Icons and empty files might be fine without the confirmation message.
This should have the typical toggles for these type of dialogs: match case, match full words and use RegEx,
I am trying to create a custom ab in Excel
Steps:
On Office RibbonX Editor:
At this point, Office RibbonX Editor closes. No errors or warnings are displayed.
When opening the xlsm file in Excel no changes were made to the file or the ribbon.
I am using
Windows 10 64 bit
Office 365 64 bit
Any tip on how to solve this issue is very much appreciated.
Thank you.
There is a Windows Forms control already existing for that. Either adapt it, or create a WPF one from scratch.
Have a look at this for details: https://github.com/Stumpii/ScintillaNET-FindReplaceDialog/wiki/Find-All-Results-Panel
Given this control uses another Scintilla editor (which will always use Windows Forms), the easiest thing would be to wrap it in a WPF control. This control could be visible only when find results are received, with an x
button to close it if needed.
Related to #36.
Related to #9. When you switch to a different part, the editing history is completely cleared. The only way around this would be to have a multi-tab interface with each part having its own tab and editor, as most IDEs would do. However, this would change the entire View - ViewModel relationships, so it would need a lot of testing.
This could be both with recognized HTML tags / attributes or simply with text. Unlike the find / replace dialog (#17), the results would be shown in a separate view, with the possibility of clicking on each of them to go directly to that line / column.
This can help debugging a problem where the user's system enters into play (particularly the .NET Framework version; see #48 for example).
As part of this enhancement, add a "copy to clipboard" button and update the bug template to suggest putting the copied info in there.
The tool is not using the full benefits of the Prism library anyway, and it is not complex enough to really need them. Similarly with Ninject. Hence, it would make more sense to move to a more lightweight framework such as MVVM Light, and hopefully reduce the size of the executable in the process.
The easiest thing to do would be to have a project for each. Otherwise, categories could be used on a per-method basis. However, the main integration tests are the ones in MainWindowViewModel, so the entire class could be marked with that category instead.
This would be difficult, given the editor keeps its own undo history and you cannot load that from somewhere else, simply clear it. Some actions might also be difficult to keep track of.
For the best look and feel (and for testing purposes), it would be better to rewrite these completely in WPF. It seems like a worth thing to do, but also potentially time consuming.
Related to #17.
Describe the bug
When I try to rename (and then ignore the renaming) of the Images, the edit-textbox prevails. It should "delesect the editing" but it's not. Even ESC is ignored.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should deselect editing.
You can already comment a block of code manually by using the standard <-- comment -->
syntax, and even change the color of those comments in settings. However, modern IDEs also allow you to select part of a text and comment / uncomment it with a single action (e.g. Ctrl-/
).
Describe the bug
With key combination associated to certain actions, the Scintilla editor might insert ASCII characters
To Reproduce
Steps to reproduce the behavior:
SI
has appeared on the editor where the cursor wasExpected behavior
No character should appear. If it does, it is because the editor does not know that KeyDown
events have already been handled.
Those files cannot be deleted during that reload operation because they are still linked by the part. However, they could be deleted in a subsequent reload.
The tool already has information about the XML schema, so this could be used for autocompletion purposes for both HTML tags and attributes.
The menu entry to do this is there, but it does not do anything yet.
If you click on those, nothing happens. Hence, the models are already prepared to deal with this situation, but not the MainView.
This should be fixed in both the top menu and the TreeView's ContextMenu (once implemented; see #4)
When a file with unsaved changes is closed. The message says:
File xyz.xlam has unsaved changes. Do you want to save them before exiting the program?
This should mention that just the file is being closed, not the entire program.
Describe the bug
editor crashes during start without a internet connection.
To Reproduce
Expected behavior
Editor does not crash.
Additional context
There can be other reasons for httpClient.GetAsync to fail:
pull request
#34
The amount of unit tests already existing is quite low, and limited to the most typical actions in the application: open / save files, insert / remove parts and insert / remove icons. These are probably the most likely to get wrong without noticing, but it would be better if the less critical areas of the application were also tested. A few examples:
Hello, I really like your refresh of the Editor.
I have a suggestion. When I press Validate
and it will just show me MsgBox with details, it would be quite nice to have then highlighted the compromised line.
Any chance this can be made or is a good idea? :-)
Describe the bug
The enter key does not stop icon ID editing if the ID is wrong, and there is no error message either.
To Reproduce
Change ID
(or press F2 with the icon selected)#
symbol, and press enterExpected behavior
The tool should tell you that the icon ID you are trying to use is invalid. Then, it should either revert back the changes you made or prevent you from leaving the editing textbox until you introduce a correct ID
Additional context
Similar to #32
In addition to clicking a button to see if the XML code is well-formed, the editor could run checks in the background and periodically tell the user the issues it finds.
Right now, found text in FindReplaceDialog might be just outside the visible region of the Scintilla editor, making it hard to realize where it is. This occurs when scrolling to the left is needed in order to make it visible.
Related to #36.
The current build system cleverly fills the build number and revision of the version, leaving only the major / minor versions to play with. It feels it would make more sense to automate the revision only based on the build ID, which is unique anyway. This way, the third digit can be used for bug fixes which do not add any new features to the tool.
This would also make it simpler to find the corresponding Azure Pipelines build based on the version.
I am not a huge fan of modal "New version available!" dialogs that appear on startup and force you to pay attention to them. My idea would be a button in the toolbar which, when clicked, will show that dialog, or perhaps go to the release page directly.
This might need some more logic in the build system to be able to read the version automatically. It should be possible to extract this from the GitHub link too, but that might require some parsing. Hence, if the build system could just write the version number somewhere, the search would become simpler. Ideally, just create a "version" branch with a single VERSION file, and read the raw data from there.
In summary, from Azure Pipelines, run a PostRelease.ps1
script doing something like the following:
git clone --single-branch --branch version https://fernandreu:[email protected]/fernandreu/wpf-custom-ui-editor.git
cd version
echo $VERSION > VERSION
git commit -a -m "Update release version to $VERSION"
git push https://fernandreu:[email protected]/fernandreu/wpf-custom-ui-editor.git version
The version
branch must already exist and have the VERSION file on it. For info on the last command, see this. The task should run after we are sure the GitHub release step went fine.
This approach could be extended to keep track of other properties, or both the latest release and latest development versions. This would be done by having several files, each one taking care of one property we need to keep track of.
Opening files and/or inserting images by simply dragging the icon onto the app window would be really convenient. Is faster especially when having only one file and need to do a quick edit.
After removing a customUI element and trying to close the file / the entire program, the "Unsaved Changes" dialog is not shown.
Related to #10.
This simply needs to be a ΒΆ
button shown in the toolbar, which can map to ScintillaNET's ViewEol
and ViewWhitespace
properties.
Describe the bug
Clicking Remove from the right click menu when an icon image name is selected does not work.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The selected image file should be deleted.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem. You can copy the version
information from the tool's About dialog here as well.
In other words, installations seem unaware of any previously existing one.
Describe the bug
Installed OfficeRibbonXEditor-v1.5.msi in Windows 7 Professional, running in a VM (VirtualBox) on a Macbook Pro 2012. After launching Office RibbonX Editor, opened a Excel .xlsm file, and this dialogue appears:
Dialog Description:
Error opening Office document
Text in dialogue:
Method not found: 'Microsoft.Win32.RegistryKey
Microsoft.Win32.RegistryKey.CreateSubKey(System.String, Boolean)',
To Reproduce
Steps to reproduce the behavior:
Expected behavior
This dialogue is of some concern - something that is expected to happen: doesn't.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Clicking OK and carrying on with using the software doesn't appear to have any issues, but I'm concerned that there might be problems when users open the files with customised menus.
This is really outside the normal sort of question but, I can't think of another way to make contact. If you aren't in a position to help, that's fine.
I am trying to run OfficeRibbonXEditor inside Wine on an Apple iMac. At present, it's crashing probably because of missing Windows components. The crashes have been in a Windows 7 environment with .Net version 4.7.2.
I have attached a copy of a crash report.
RibbonX_Editor_crash_backtrace.txt
Are you able to help work out which Windows components are missing ?
Thanks.
Apparently the GithubPat comes empty now, even when it is defined in the pipeline. This is a minor issue, as releases do not happen very often, and it is just a matter of updating the info branch manually afterwards.
The executable size from v1.4 to v1.5 increased from ~2.9 MiB to ~4.5 MiB (before the pdb files were removed). Find out the root reason for this, and whether there is any unused package reference that can be removed.
Probably, this happened after AutoFac was added (which is definitely a package being used). Hence, it could be there is no reasonable way of reducing the executable size further.
The latest version is currently obtained from the info
branch. This works fine but adds a lot of complexity to the Azure build pipeline.
The same information can be obtained directly from the GitHub Releases API, either from the release title or from the tag associated to it.
In summary:
GET https://api.github.com/repos/fernandreu/office-ribbonx-editor/releases/latest
Accept: application/vnd.github.v3+json (optional)
Users will keep using the info
branch until they update the tool manually, so the build pipeline behaviour should not be changed for a while (e.g. a few major releases after this gets implemented, or a full year).
If no customUI file references an image, there is no reason to embed it in a file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.