Coder Social home page Coder Social logo

fernandreu / office-ribbonx-editor Goto Github PK

View Code? Open in Web Editor NEW
475.0 475.0 93.0 3.88 MB

An overhauled fork of the original Custom UI Editor for Microsoft Office, built with WPF

License: MIT License

C# 96.15% PowerShell 2.70% Inno Setup 1.15%
custom-ui excel office powerpoint ribbon ribbonx standalone word wpf

office-ribbonx-editor's People

Contributors

azure-pipelines[bot] avatar bitaller avatar fatihmeh avatar fernandreu avatar llnulldisk avatar mo-gul avatar nbelyh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

office-ribbonx-editor's Issues

Allow MultiSelect in Insert Icon Dialog

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.

Add recent list to FindReplaceDialog

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.

Link GitHub tag and assembly version in pipeline

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.

Tool crashes when saving a document already open in Office

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:

  1. Open an Office document in the tool
  2. Open the same document in the corresponding Office program
  3. Try to save it, either with or without Reload on Save enabled

Expected 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.

Avoid reloading document on save if nothing has changed

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.

Improve source code editor

ScintillaNET allows easy development of advanced features which are not implemented yet. A few examples:

  • Autocompletion of HTML tags and attributes
  • Underlining syntax errors in real time
  • Find / Replace dialog
  • Show / hide invisible character symbols

Warn when saving document if external changes would be lost

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.

Autoindent new lines

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.

Add a find / replace dialog

This should have the typical toggles for these type of dialogs: match case, match full words and use RegEx,

After clicking Save, Office RibbonX Editor closes and does not keep changes

I am trying to create a custom ab in Excel

Steps:
On Office RibbonX Editor:

  1. open an xlsm file
  2. insert Office Custom UI part (I've tried both 2007+ and 2010)
  3. insert sample XML > Excel A Custom Tab
  4. generate callbacks
  5. validate
  6. save

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.

Add find results control

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.

Keep editing history after switching to a different part

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.

Add a find usages dialog

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.

Show system info in About dialog

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.

Move to MVVM Light

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.

Split between unit and integration tests

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.

Change ID

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:

  1. Open Excel file with images (toolbar)
  2. Click on an image and select "Change ID"
  3. Click on another image.
  4. The first image is within textbox.

Expected behavior
Should deselect editing.

Add action to comment / uncomment selected text

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-/).

Editor can print ASCII keys when a key binding is used

Describe the bug
With key combination associated to certain actions, the Scintilla editor might insert ASCII characters

To Reproduce
Steps to reproduce the behavior:

  1. Open a customUI part in the editor
  2. Press Ctrl-O to launch the open file dialog
  3. Close the dialog, or move it to one side
  4. The ASCII character SI has appeared on the editor where the cursor was

Expected behavior
No character should appear. If it does, it is because the editor does not know that KeyDown events have already been handled.

Wrong Unsaved Changes message when closing individual file

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.

editor crashes without a internet connection

Describe the bug
editor crashes during start without a internet connection.

To Reproduce

  1. Disconnect all internet connections
  2. Start editor
  3. client crashes immediately in VersionChecker.CheckVersionAsync
  4. See error

Expected behavior
Editor does not crash.

Additional context
There can be other reasons for httpClient.GetAsync to fail:

  • github is down
  • connection timeout due to network or webserver weirdness
  • domain not resolved/blacklisted by your dns-server

pull request
#34

Finish creating unit tests for the entire application

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:

  • Changing icon IDs
  • Validating XML
  • Generating callbacks
  • Checking whether sample XML code is inserted where it should
  • Ensuring external modifications of a file after it was opened in the tool are indeed preserved with the "reload on save" option

Validate - Highlight Line

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? :-)

Enter key does not finish icon ID editing if the ID is wrong

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

  1. Open a document with icons (or add one yourself)
  2. Right click on the icon and click Change ID (or press F2 with the icon selected)
  3. Enter an invalid icon ID (for XML standards), such as with leading / trailing spaces or including the # symbol, and press enter
  4. The editing textbox does not go away

Expected 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

Underline syntax errors at real time

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.

Ensure found text is always visible

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.

Automate revision number only

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.

Notify users if a new version becomes available

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.

Open files by drag and drop

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.

Remove

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:

  1. Insert an Icon into the Custom UI editor
  2. Right click on the icon image name
  3. Click Remove
  4. Note that nothing happens

Expected behavior
The selected image file should be deleted.
Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2019-08-13 at 8 50 15 AM

Additional context
Add any other context about the problem. You can copy the version
information from the tool's About dialog here as well.

Method not found

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:

  1. Load Office RibbonX Editor
  2. Open any Excel .xlsm file - happens consistently
  3. See error

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.

Running inside a Wine bottle (on Unix)

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.

Fix GitHubPAT error in Azure Pipelines

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.

Find out reason for binary size increase

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.

Get latest release information directly from GitHub Releases

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.