Skip to content

@michmech michmech released this Apr 3, 2018 · 7 commits to master since this release

It's been a while since Xonomy had a new version released, so quite a few new features have accumulated.

Major features

  • Say good-bye to carpal tunnel syndrome and say hello to increased productivity: Xonomy now supports keyboard navigation. You can now set up Xonomy in your application so that your users will be able to navigate around the XML document with the keyboard as well as the mouse. More info on this can be found in section 15.2 in the Xonomy manual. Thanks to @rodoch for helping with the implementation of this much-requested feature.

  • Related to that, it is now possible to assign keyboard shortcuts to menu items. This is documented in section 4.5 of the Xonomy manual.

  • To make it easier for your users to drag and drop elements around the XML document, Xonomy now offers an optional lay-by area which is displayed on the right-hand side of the screen. Users can drag and drop XML fragments into the lay-by, keep them there temporarily, and then drag and drop them to some other location in the XML document. See the properties allowLayby and laybyMessage in section 14.1 of the Xonomy manual.

Minor features

  • Menu items can now have icons, this is documented in section 14.4 of the Xonomy manual.

  • The askRemote asker function has been extended with an additional feature which allows your client-side application to add extra items to the list returned by your server-side hookup. See section 13.4 in the Xonomy manual.

  • You can now allow your users to switch Xonomy's mode (either nerd or laic) by clicking a small icon in the corner of the screen. See the properties allowModeSwitching and onModeSwitch in secion 14.1 of the Xonomy manual.

  • Several new menu action functions have been added: Xonomy.duplicateElement, Xonomy.moveElementUp, Xonomy.moveElementDown, Xonomy.mergeWithPrevious, Xonomy.mergeWithNext. These are documented in section 4.2 of the Xonomy manual.

  • When adding a new sibling element with the fuctions Xonomy.newElementBefore and Xonomy.mewElementBefore, the new element is always moved to its correct position as dictated by the mustBeBefore and mustBeAfter properties of its element specification.

  • Some improvements have been made to the handling of hierarchical menu items in the menus of elements and attributes. One improvement is that menu items which are empty (= contain no subordinate menu items) are now automatically hidden. Another improvement is that you can specificy whether you want a hierarchical menu item to be expanded or contracted with the .expanded property. This is documented in section 4 of the Xonomy manual.

  • A few new methods have been added to surrrogate element objects: getPrecedingSibling(), getFollowingSibling(), setAttribute(name, value), addText(txt). These are documented in section 10 of the Xonomy manual.

  • When inserting inline markup, your users no longer have to point the mouse exactly on the thin grey line underneath the text. They can now click anywhere in the text while holding down the Ctrl key (or the Meta key if on a Mac). This has been documented in section 8.3 of the Xonomy manual.

  • The captions of elements (= the caption property of the element specification) are no longer ignored for elements that don't have text content. The description in section 14.2 of the Xonomy manual has been updated accordingly.

  • The backgroundColour property of an element specification can now be a function (as well as a string). Its description in section 14.2 of the Xonomy manual has been updated accordingly.

  • Some cosmetic adjustments have been made to the positioning of drag handles and plus/minus signs beside XML elements to make to sure they do not appear misaligned in some web browsers (hello Chrome and IE).

Assets 2

@michmech michmech released this May 12, 2017 · 53 commits to master since this release

New features

  • In a document specification, the values of unknownElement and unknownAttribute can now be functions. This is documented in section 14.1 of the Xonomy manual.

  • The menus that appear when the user clicks on element named and attribute names can now be hierarchical. See section 4 in the Xonomy manual.

Bug fixes

  • Fixed a bug in Xonomy.editRaw which caused raw text/markdown editing to not work sometimes.

  • Introduced a workaround for a drag-and-drop issue in Chrome.

  • Pop-up bubble placement has been made more robust in case of limited screen space.

  • When adding elements and attributes into the document, their surrogate objects now always have a parent, even before they have been physically inserted into the document.

Credits

Thanks to @filodej for most of the work on these features and bug fixes.

Assets 2

@michmech michmech released this Apr 9, 2017 · 77 commits to master since this release

Bug fixes and changes

  • Fixed an issue which caused shy attributes to sometimes fail to roll out automatically after the user has added them. Thanks to Brandon Ryan of Mainstream Technologies for reporting.

  • The mustBeBefore and mustBeAfter constraints of an element specification can now be functions as well as literal arrays. This is documented in chapter 14.2 of the Xonomy documentation.

  • Up till now, Xonomy always imposed the mustBeBefore and mustBeAfter constraints when rendering the document and then whenever the document changed. This meant that Xonomy sometimes silently reordered elements if they happened to be in an order that violated the mustBeBefore and mustBeAfter constraints. This new version of Xonomy no longer does this: it leaves elements in the order in which they are, even if that violates the mustBeBefore and mustBeAfter constraints. The only time when the constraints are imposed is (a) when a new child element has been appended to a parent element and (b) when dragging and dropping elements around the document. In other words, if you now ask Xonomy to render a document which is invalid because some child elements are in an incorrect order, Xonomy will not attempt to "correct" the problem but will simply render the document as is. This is consistent with how Xonomy handles invalid documents in general: it does not attempt to fix them but renders them as they are. Chapter 5 has been updated to reflect this small change in behaviour.

  • Laic mode has been redesigned.

  • Xonomy now has cool new features for accessing server-side data, check them out in the newly written Chapter 13 in the Xonomy manual!

New features for fixing invalid documents

  • It is now possible to create default specifications for unknown elements and attributes. Xonomy will use these as defaults for elements and attributes that are not defined in the document specification. This is described in section 14.1 of the Xonomy documentation.

  • When an element is not allowed to have text nodes but has one, and when the text node becomes empty, Xonomy removes it.

Fixes and features contributed by Kim Lindhardt Madsen

  • Fixed a bug which caused the surrogate functions getChildElements() and getDescendantElements() to throw exceptions when the surrogate element had text nodes.

  • Element specifications and attribute specifications can now have a title property which is displayed as a tooltip when the user mouse-overs the element name or attribute name. The property can be a (multilingual) string, or a function that returns a (multilingual) string. If it is a function, it takes an argument which is a surrogate object representing the element or attribute. Documented in chapter 14 of the Xonomy manual.

  • Clicking the name of an element or attribute will now trigger a jQuery event called xonomy-click-element and xonomy-click-attribute. The event handler is given the surrogate object as an argument. This is documented in chapter 15 of the Xonomy manual.

Assets 2
You can’t perform that action at this time.