GithubHelp home page GithubHelp logo

srm985 / axure-redline-tool Goto Github PK

View Code? Open in Web Editor NEW
60.0 4.0 16.0 5.28 MB

Axure Interactive Redline Tool

Home Page: http://www.seanmcquay.com/axure-redline-tool.htm

License: MIT License

HTML 1.61% JavaScript 84.66% SCSS 13.73%
axure javascript jquery css wireframes mockups prototyping plugin spec design-specs

axure-redline-tool's Introduction

Axure Interactive Redline Tool

This plugin intends to mimic some of the functionality of the plugin Measure for Sketch or InVision Inspect. This application is meant for those who rely on Axure in their organizations and would like to provide developers with always-up-to-date design specifications. As Axure does not support plugins within the application itself, this code resides within and is applied to your AxShare projects.

Super Basic Demo

Plugin Usage

Latest Version

<script src="https://cdn.jsdelivr.net/npm/axure-redline-tool@latest/web/axure-redline-plugin.js"></script>

Current Version

<script src="https://cdn.jsdelivr.net/npm/[email protected]/web/axure-redline-plugin.js"></script>

There are several ways to use this "install" this plugin. The easiest option is to copy the script link above into your AxShare project as a plugin. Copy the script of the version you'd like to use, or simply use the script marked "latest" to ensure you're always subscribed to the latest application updates. The code in the scripts above is served from a CDN to ensure a fast response, no matter your location. If you prefer to house the code directly in your AxShare project, you'll need to copy and paste the code found within /axure-redline-tool/web/plugin.txt into your AxShare project as a plugin. The code combination is derived from the markup framework, CDN links, the pertinent CSS, and the supporting JavaScript / jQuery code base.

To apply this code to one of your AxShare hosted projects, navigate to www.share.axure.com and log into your account. Once logged in, you will see an inline gear icon to the far right of each Axure project. Hovering over this icon provides a list of options, including PLUGINS which you should select. Once on the plugin page, select NEW PLUGIN. Name your plugin whatever you deem appropriate and select End of the Head as the insertion location. Paste your plugin.min.htm code into the content area and save the plugin. Select all desired pages within which you'd like to have the interactive redline tool. If you would like to have the plugin appended to any new pages, you may select Add to new pages by default. Once saved, your plugin should be activated. To modify the plugin, simply select edit and paste in any replacement code.

Previous Releases

Axure Plugin Tutorial

plugin demo

Installation / Running

Install Node.js

Update npm to the latest version:

$ npm install npm@latest -g

To launch a demo instance of the plugin in your browser, issue the following commands:

$ cd axure-redline-tool
$ npm install
$ gulp develop

Prerequisites / Dependencies

This project was built and tested on jQuery 3.2 and Axure RP.

Building Modified Plugin

If you've made changes and would like to build an updated version of the plugin, run the following commands to generate plugin.txt and plugin.js. Copy the contents of plugin.txt into your AxShare project as shown above.

If you would like to modify the plugin, two build scripts are available to aid in this.

To quickly build your changes for production issue the following commands:

$ cd axure-redline-tool
$ npm install
$ gulp build-prod

Because this is a compiled plugin i.e. HTML, CSS, and JS are merged into one file, you can also keep the plugin continuously watching for source changes. This will then automatically rebuild the plugin.txt file and you may then copy the plugin code directly into AxShare. This will not open an instance of the plugin in your browser. For this, issue the following commands:

$ cd axure-redline-tool
$ npm install
$ gulp build-watch

Bugs / Drawbacks

As this code is embedded within Axure projects, it does not have direct control of how assets are exported from within Axure. Additionally, Axure projects allow much more functionality and interactivity than those generated in Sketch and it's difficult to intercept and interact with these. The code makes every attempt to handle the various nested elements exported from Axure, but if you do encounter an issue, please let me know and I'll promptly resolve it.

You may find the generated artboard sizing odd during initial use. This tool scans all page elements and sizes the artboard based on the most-extreme elements. If you would like a specific size artboard, I would suggest using a background rectangle within Axure to define this. Alternatively, you may use a combination of vertical and horizontal lines to define your artboard border. For example, if you would like an artboard of 1000px x 1000px, place a rectangle as the backmost element in your Axure project with a X and Y location of 0 and dimensions of 1000px x 1000px.

*Axure chooses to export some common elements such as circles and lines as images instead of using CSS. As such, you may find it difficult to find accurate dimensions on some items. A workaround for circles is to place a square in Axure and set the border radius greater than or equal to 50% of the square's dimensions. This will then export as an HTML element. Axure also has difficulties in exporting elements with lots of border attributes and box shadows. It typically exports these as images and you will be unable to retrieve any CSS attributes.

Coming Features

  • Provide Sliced Images
  • Document Color Palette

Versioning

We use SemVer for versioning.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Change Log

Version 1.1

  • Resolved the issue of overflow scrolling content affecting artboard sizing. In Axure terms, hidden dynamic panel content no longer causes the generated artboard to be bigger than visible elements.
  • Resolved how the tool handles Axure annotations. Annotations can be read while the tool is disabled. While the tool is enabled, their icons are not considered interactive elements.
  • Added key command functionality to support zoom controls through [Ctrl +] / [Ctrl -] and Esc key to close the redline tool panel / deselect the element.
  • Added zoom tracking support to ensure current zoom level is maintained while progressing through flows.

Version 1.1.1

  • Revised code to handle artboard rendering issues. Axure uses images instead of CSS for many common elements such as lines and circles. These exported images often have incorrect dimensions which cause the redline tool to incorrectly size the artboard. The code has been revised accordingly to handle these scenarios.
  • The tool now removes element focus when the page is scrolled. This issue caused the orange selection box to remain fixed while the element below was scrolled. Code currently closes the redline tool when scrolling occurs. Later enhancement will be to bind orange selection box to the element selected so that even with scrolling the box remains.

Version 1.1.2

  • Build scripts have been ported from Grunt to Gulp. Additional build options are now available, and the code injection has been improved.

Version 1.1.3

  • Provided color swatch preview for color and background-color attributes.
  • Now support HEX and RGB(A). Color formats can be toggled by clicking color swatch.

Version 1.1.4

  • Provided support for repeater widgets. Updated code to ignore embedded script and style tags.
  • Added box-sizing attribute to inputs to ensure correct sizing across browsers.

Version 1.2

  • Revised how inter-element dimensions are calculated. Previously, all elements were iterated, and data attributes appended. Now this is done in real-time, on only the active elements. This will help performance on pages with many elements.
  • Resolved issue where the tool displays unintended hidden content.
  • Resolved small CSS styling changes to improve consistency in displaying attributes.
  • Resolved issue where tool throws error when disabling while an element is selected.
  • Tool now provides correct artboard padding when zooming.
  • Resolved measurement flicker which occurred when hovering over a measurement line or tag.

Version 2.0.1

  • Axure Component Names - The tool will now display any element names you've used in your project.
  • Annotations Always Clickable - Annotations are always available to click, even when the tool is enabled.
  • Move Redline Switch - The redline tool enable switch has been moved to the top header for better visibility.
  • Show Pseudo Class Attributes - The tool now provides CSS for those pseudo classes provided by Axure.
  • CDN Link - The tool can now be served from a CDN link which means faster load times and no more copying of huge blocks of code.
  • Hotkey Interactions - Now it is no longer required to disable the tool to interact with Axure elements. By holding down [Ctrl] (Windows) or [โŒ˜] (Mac) you can hover over or click on elements.
  • Business / Developer Links - The tool now offers up sharing links for both business and developers. The business link will prevent the tool from even rendering itself on the page. This ensure there is no confusion when sharing your prototypes with business.
  • Loading Spinner - On large pages the tool can take quite long to render the artboard. A loading spinner helps to indicate background action.
  • Color Swatches - Updated code to handle color swatches for any CSS attribute containing a color.
  • Parent Opacity - When adjusting opacity for the entire element in Axure, it is only applied to the parent. The tool now can accurately extract this information.

Version 2.0.3

  • Added CSS block properties field for easy cut and paste.

Version 2.0.4

  • When RGBA colors are displayed with an opacity of 1, we now convert them to RGB.
  • If a CSS attribute opacity is 1, we now don't bother displaying it.
  • Resolved bug in Microsoft Edge creating issues when displaying RGBA color values.

Version 2.0.5

  • When sharing the business link, annotations are disabled by default through the AxShare interface panel.

Version 2.0.6

  • Revised how sharing links are formed to accommodate private enterprise server links.

Version 2.0.7

  • Corrected page loading of HTML, CSS, and Google fonts. Loading of fonts was causing incorrect jQuery measurements of elements.
  • Updated CSS to support RP9 artboard generation.
  • Updated to support RP9 annotations.

Version 3.0.0

  • Ported application to React.
  • Slight UI modifications.
  • Grid overlay support.

Version 3.0.1

  • Corrected plugin path.

Version 3.0.2

  • Added support for native inspect tool and Axure Cloud.

Version 3.0.3

  • Corrected splash screen modal body issue.

Version 3.0.4

  • Resolved interaction bugs with native inspect tool.
  • Resolved artboard padding click error.
  • Revised build tools for legacy support, ensuring no breaking changes.

Version 3.0.5

  • Removed click functionality from #base which is essentially the artboard and shouldn't be interacted with.
  • Added opacity to #base artboard to style it more like a non-interactive element.

Version 3.0.6

  • Added additional functionality to support jumping artboard in RP9 projects and projects using native inspect tool.

Version 3.0.7

  • Corrected artboard background color configuration. For undefined artboard backgroud colors, the artboard is rendered as transparent white. Otherwise, the user-defined color is used.
  • Added functionality to dev-live script to support serving a custom URL.

Version 3.1.0

  • Corrected CSS Color Name Matching - The Redline Tool supports the use of CSS color names in lieu of hex/RGB values. The matching algorithm which displays the swatch for the given color was partially matching other words. This meant if the field value was bored, a red color swatch was applied.
  • Added Modal Inspection Support - Modals or other elements which break out of the normal page flow were being incorrectly read by the tool. From a technical aspect, this was occurring on elements with position: fixed;.
  • Border Color Shown With No Border - On text blocks, the tool was reading a border-color, without a border style being defined. There is no reason to display this attribute without a border-style defined.
  • Text Shadow Attribute - Added the CSS attribute of text-shadow to the list.
  • Enhanced Support For Individual Word Styling - If you attempted to style one word differently within a text block by applying, for example, a different color or font weight, this would cause the styled word to break out of the text block. From a technical perspective, this occurred because we were setting <span> elements to display: inline-block;. This was done so we could accurately measure their height, width, and position. Now for these elements, we won't show a height, width, or position because it conveys no information. We instead select the parent container which is typically a <p> tag.
  • Disable Artboard Concept - The redline tool attempts to mimic the concept of an artboard used in many other tools. This is represented as a floating, semi-opaque, centered board. Some users have very large documents or do not prefer this concept.

Version 3.1.1

  • Migrated from Gulp to npm for all build and development tasks
  • Updated dependencies
  • Added the CSS attributes of letter-spacing and text-transform
  • Added postcss for legacy browser support

axure-redline-tool's People

Contributors

srm985 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

Watchers

 avatar  avatar  avatar  avatar

axure-redline-tool's Issues

Multi-Line Text Support

I noticed that Axure unfortunately breaks multi-line texts apart in individual lines. Take a look at this example2. A textblock has the the following structure in Axure's HTML: a DIV for the paragraph, a DIV for the textblock minus the padding, a P for each line to text, and a SPAN for the text itself.
Whereas single a line of text does not have the second DIV.
It would be great if the plugin would recognize the a multiline text and indicate it โ€“ and it would be even better if it it would calculate the padding (based on the second DIV) and add this as well. And based on the location of the second DIV you could even "guess" the vertical alignment (top, middle, bottom) of the text block.

https://ffjn5q.axshare.com/#g=1&p=home

Repeater Widget Issues

It was reported that the tool has issues correctly handling repeater widgets. Review, and determine cause. Then, define path forward.

Scroll After Zooming

When zooming in on a project, the scrollbars do not adjust to ensure the user can scroll the full dimensions of the project (plus padding).

Parent Element Contains Opacity

The parent element contains the opacity which is being applied to the child. For example id="u1" has opacity of 0.5 and id="ui_div" has opacity of 1.0. In this scenario, we cannot click on "u1" and therefore we must iterate up to find the opacity and display it with the child.

Business / Developer Variants

By passing a parameter in the URL, the designer should have the ability to show business interactive prototypes without the redline tool displayed at all - therefore simplifying their experience.

Implement UI Tests

As this application spends a lot of time modifying the DOM, UI testing is essential. Consider hooking into Axshare.

Tool Displays 0 Or Error For Auto Width/Height

The redline tool is unable to infer the height or width of elements set to 'auto'. Review and determine if a different function is available or iterate until a parent element is found with valid dimensions.

Interaction Styles

Hi,
currently the define Interaction Styles are not displayed in the redline tool. Only the state defined as the initial state (active, seleted, disabled).
Consider showing the information (even though this might be messy, since it is potential a lot of css style information)

Trigger Axure Interaction With HotKey+Click

Currently the redline tool disables all Axure interactions such as button clicks or drop downs. This is done so that when the user clicks on an element, they can retrieve the CSS attributes. If it were not done this way, the user might click on a button to check the attributes, only to be redirected to another page. In lieu of this, I'd like to offer the ability to trigger these interactions, but only with the combination of a hotkey such as Ctrl+Click / Cmd+Click.This would prevent the user from having to turn the tool on and off.

Common Grid Overlays

Provide the ability to overlay non-interactive grids. The user should have the ability to toggle enable these overlays and then to select the number of columns and to specify either gutter width or column width. This should be saved local to the user's machine via localstorage. Each project should allow the user to save unique grid settings, which will be accomplished automatically through localstorage.

Elegant Artboard Padding

When rendering the underlying artboard i.e. #base, consider padding it better by duplicating top and left padding on right and bottom.

Show Axure Hotspot Elements

Currently Hotspots are "invisible" in the redline tool. They can be clicked if one knows where they are.
Please consider to add fill or outline color (similar to Axure's mask setting) to indicate their position.

Move redline enable switch

The redline toggle switch is not accessible when the user clicks on the canvas and not on an element.
Consider moving the toggle next to the zoom buttons to have it always accessible.

Keep annotations clickable

Currently Axure's autogenerated annotations are visible but not clickable when the redline tool is enabled.

Please keep them clickable so one can still access the annotation content. Alternatively, consider adding the content in the redline tool sidebar.

Measurement Hover Flicker

When the tool is displaying inter-element measurements, if you hover over the measurement, the measurement rapidly flickers. This is because the measurement is considered a non-measurable element, but as soon as the marker is removed, the element is then hovered and the marker returns. The cycle then repeats.

[wish] Link to parent component

Hi,
I'd like to have a link to select the "parent component" next to the "parent component" text field in the sidebar. This would allow me to access the properties of the parent element fast(er).

Cheers
l.

Loading Spinner

On page with a very large number of elements, it takes considerable time to parse. Consider adding a loading indication to provide user feedback.

Axure Component Names

Could you add the Axure element names to the redline tool display? We are using a certain naming convention within our specs, so it'd be helpful if we could see them there as well.

Artboard Incorrectly Rendering

Axure has a nasty habit of substituting images for CSS. For example, when drawing a circle, Axure exports the resulting element as an image instead of creating a square with border radius of 50%. This can be circumvented if you create your circles within Axure in the same way. Instead of using the circle tool, place a square, define it's dimensions, and then set its border radius greater than or equal to 50% of its width or height respectively.

Axure apparently also does this with straight lines... Axure decided that they would export straight lines as images. These images are then placed inside of a div that is just 1px high for horizontal lines or 1px wide for vertical lines. This causes the redline tool to think it is a scrollable element which causes its position to be discounted from the artboard sizing algorithm.

Rethink Zoom Controls

Potentially consider removing zoom controls from header and convert to a floating widget.

Artboard Size With Dynamic Panels

When the redline tool materializes the artboard within the pan area, it determines the sizing based on the max height and width of all the elements on the page. When using Axure Dynamic Panels, the elements may be wider or taller than the intended artboard size and consequently cause the artboard to be sized larger than necessary.

Implement React Framework

Implement React framework and break out codebase into components. Implement Webpack for bundling.

Axure Notes - Prevent Redline Interaction

Axure notes currently are treated as design elements and the redline tool displays dimensions and attributes for the notes. Prevent interaction with those elements which contain classes related to annotation. Consider hiding all notes while the tool is active.

notes

Multi-Colored Text Missing Spaces

If a string of text within a block of text has a different color or different styling applied, the word will bunch against the previous word.

This is because we are globally setting <span> to display: inline-block;. There was a reason for this, but now I'm not certain. Research to determine impact.

span

[wish] Tab key to iterate through elements

Hi,
I'd be nice to use the tab key to click through the different elements.
Not sure if this is even possible, but sometimes clicking on the proper element is hard ( e.g. there when several elements are stacked).

Serve CDN Link

Refactor code base into single script file to be served from CDN.

CSS Properties Block

Create one text area which displays all available CSS properties for an element - allowing users to copy the whole block at once.

Tool Displaying Hidden Content

The redline tool is displaying unwanted hidden content. This is occurring because the tool issues a $('.zoom-wrapper *').show() command with enabling or disabling.

Hidden Annotations

When a business link is loaded, disable links through the AxShare interface.

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.