This disclosure relates generally to previewing documents, and in particular to viewing and editing a document from a document preview.
Online content management systems enable users to store documents online where they may be accessible by many different users and by different devices. These systems further enable users to view stored documents in a preview mode, which is typically a rendered image displayed in browser or other viewing application. While previews can be generated, for example, by converting the document to a printed page or other static preview, editing these documents through the preview is a challenge. Since documents cannot be edited in preview mode, the user typically must access the document in its native format using a native application appropriate for the document type. If the user does not have an appropriate native application for the document installed on her client device, they will be unable to edit the document.
A document preview system stores documents in their native format and provides previews of the native documents in a non-native form, such as in a browser, to users accessing the document preview system. The document preview system permits users to view and modify the contents of the native document. The document preview system may also permit users to synchronize the native document across different user devices. A native document is a structured document with fields that include values for the field, such as a spreadsheet. A value may be defined by a formula that may reference another field in the native document.
To provide document previews, the document preview system generates a preview document of the native document. The preview document provides instructions for a client device to render the preview document, such as through an HTML file or other file type readable by a browser. The preview document includes preview code, a field mapping, and a formula listing. The preview code specifies the code for interpretation by the browser to generate the preview of the native document. As an example of the preview code, when the preview document is an HTML file, the preview code includes a <table> tag. The field mapping designates a translation between fields in the native document and a specific element in the preview code. A formula listing indicates which fields in the native document are associated with formulas and for each such field, the formula that defines the value for that field. In one embodiment the formula listing is integrated into the preview code, such that the formulas in the listing are associated with the element as designated by the field mapping. The field mapping and formula listing permit a client device to display the preview document with an indication of the native document fields and any related formulas. The preview document is provided to the client device for display to the user of the client device.
At the client device, the browser interprets the preview document to provide a preview to the user. The browser may also execute additional code, such as JavaScript or another language interpreted within the browser for displaying and manipulating the preview. The native document values are displayed to the user within the preview in the elements designated by the preview code. A user may select an element to view and/or edit. When the user selects an element, the formula associated with that element is displayed to the user. The user may modify the element, for example by entering a new value or by entering a formula to define the value. When the element is modified, any entered formula must be evaluated, and other fields within the document may be affected, such as those fields that reference the modified field. Additional components, such as charts or graphs, may also be affected. Since the preview document is shown in a browser, the browser may not be able to directly update the preview with the modification.
To update the native document and the preview, the client device identifies one or more fields changed by the user in the preview and generates a change list that specifies the identified field and the user's change, and sends the changed value or formula to the document preview system to modify the synchronized native document. In addition, the client device may generate a temporary document for displaying the modifications prior to the modification of the synchronized native document. To generate the temporary document, the client device modifies the contents of the preview of the native document, for example as stored at the client device, or from the document preview system. The modification made by the user is applied to the copy of the preview document and an updated temporary preview document is generated from the modified copy. This parallel process permits the client device to provide the modifications to the native document to the user prior to the changes being committed to the document preview system.
When an update to the preview document is received by the client device, such as from the document preview system or to a copy, the updated preview document is displayed to the user. To smooth the transition between the display of the original document version to the modified version, the client device renders the updated preview to a hidden portion of the screen, such as a hidden iframe. Prior to displaying the updated preview, the client device identifies a current context of user's interaction with the preview, such as the user's cursor location, and any selection of portions of the preview. The updated preview is swapped for the preview in the display and the current context of the user's interaction is duplicated in the updated preview when the updated preview is displayed. This can be performed within a single refresh cycle of the browser's display system, making it appear as though the action was performed on a local document.
By updating a copy of the native document, without delaying for the synchronized copy to update, and maintaining the context for a user across the updated preview, the client device is able to provide a seamless experience for the user to modify a native document within a browser.
The figures depict various embodiments of the present invention for purposes of illustration only. One skilled in the art will readily recognize from the following discussion that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles of the invention described herein.
Document preview system 100 stores native documents and provides native documents and previews of the native documents to client devices 110. A native document is a document created using an application program and that uses particular formatting and rendering functionality of the application program for its display on client device 110. The data in the native document is typically structured, for example providing specific locations and designations for data in the native document. One example of a native document is a spreadsheet as generally shown throughout, though other types of native documents that have fields defined by formulas may also be used, such as forms, presentations, and data tables.
A native document includes one or more fields defining the location of data within the structured document, for example a specific cell in a spreadsheet such as B8 or A3. Each field may include a value, which may be a formula that references another field in the native document. For example, the value at cell A5 may be defined by a formula referencing cell A4: “A5=A4+5”. Thus, each cell may reference one or more additional fields in a formula, which may themselves reference another field, meaning that modifying one field's value may affect many additional fields.
Returning to
As described more fully below, the preview document includes preview code, a field mapping, and a formula list. The preview code designates the values and display characteristics of the native document. For example, the preview code may designate a table containing the values of the native document, including height and width dimensions of the elements in the table. The height and width dimensions format the elements to match the size of fields in the native document. An element designates a specific slot or location in the preview code in which data (e.g., values and formulas) may be placed. In this example, the table is a <table> tag in HTML formatting including elements making up the table. Each element in the table is related to a field in the native document. A field mapping specifies, for each field in the native document, which element in the table corresponds to that field. For example, for a field A3 in the native document, the field mapping indicates that it corresponds to table element 5 in the table. In one example, rather than being a component of the native document, the field mapping may be generated when required by preview system 100 or client device 110 based on height and width dimensions for the elements in the table. The preview document also includes a formula listing that designates which fields in the native document are associated with formulas and for each such field, the formula that defines the value for that field. The formulas generated for a table in one embodiment are inserted into table elements as invisible <div> elements. In another embodiment, the formulas are maintained in the formula listing and are not directly inserted into the table elements. For example, the formulas may be saved in HTML metadata as a JavaScript Object Notation (JSON) mapping from cell coordinate to formula text.
Thus, document preview system 100 stores documents and provides document previews to client devices 110. Document preview system 100 provides a preview of a native document to permit an operator of client device 110 to view the preview prior to (or in lieu of) accessing and modifying the native document. In the preview of the native document, the document preview system 100 provides the preview to the client device 110 and permits users to enter modifications to the preview on the client device 110. The document preview system 100 stores modifications to the native document and synchronizes such modifications with other client devices 110, such that these modifications are viewable and modifiable by a native document application that accesses the native document.
Client device 110 may be any suitable computing device for viewing and modifying documents stored at document preview system 100. Client devices 110 may also synchronize documents that are locally stored at client device 110 with document preview system 100. When documents are synchronized, changes or modifications to a document at client device 110 are transmitted to document preview system 100 and reflected in the document stored at document preview system 100 and vice versa. In some embodiments of document preview system 100 and the document preview techniques disclosed herein, documents are not synchronized. In other embodiments, features of document preview system 100 are performed at client device 110 to provide previews to other client devices 110, without a centralized document preview system 100. Examples of devices include desktop and laptop computers, hand-held mobile devices, tablet computers, and other computing devices. The operation of client device 110 in various embodiments is further described below.
Client devices 110 also execute various applications and other executable programs. As shown in
The native document application creates and modifies native documents on client device 110. Such native document applications include productivity applications such as, spreadsheet applications, presentation applications, as well as other applications according to the type of native document modified by client device 110. When client device 110 is synchronized with document preview system 100, modifications to the native document performed by the native document application are synchronized to document preview system 100.
Each client device 110 communicates with document preview system 100 through network 120. Network 120 is any suitable network and may include local networks, corporate networks, global networks, and any combination of these. In typical configurations, client devices 110 communicate via a wired or wireless communication network to a local network service provider, and communicate with document preview system 100 through the Internet. In certain configurations, client devices 110A and 110B communicate directly with one another without network 120 as indicated in
To preview a given native document, preview generation module 200 generates a preview document, which includes data for a client device 100 to display the native document in a browser, including the preview code, field mapping, and formula listing as indicated above. When a native document is stored at the document preview system 100 at the native document store 250, the preview generation module 200 prepares the preview document. To prepare the preview document, the preview generation module 200 analyzes the native document to output the preview code for the document. The native document is also analyzed by a height and width parser implemented by the preview generation module 200 to determine the field mapping for the native document fields to the preview code elements. In addition, the preview generation module 200 generates a formula listing that specifies the formulas for each field in the native document. To generate the formulas for a field, the preview generation module 200 expands any “fill down” formulas that to determine the specific formula for each field in the range of formulas. To expand the formula, the preview generation module 200 determines the source field and determines whether the formula references a field for its calculation and if so, whether the referenced field is incremented within the range of additional fields based on the position of the field in the range of fields. When the formula references additional fields, a formula is generated for the formula listing that specifies the formula using the incremented field applicable to each formula within the range of fields. These expanded formulas are stored as the formula listing for the native document and specify the formula applicable to a field in the native document. Using the field mapping, the formula listing can be applied to the elements specified in the preview code. The preview generation module 200 stores the generated preview documents in preview store 260.
Native document store 250 stores native documents. Preview store 260 stores generated preview documents associated with the native documents.
Document manipulation interface 220 is an interface for manipulating and parsing native documents in native document store 250. In certain embodiments, the native documents are maintained in proprietary formats or otherwise difficult to directly manipulate. The document manipulation interface 220 provides an application programming interface for various modules to interact with the native documents 250. Document manipulation interface 220, for example, receives instructions to insert modifications to the native documents.
In embodiments where the native documents are synchronized with client devices 110, the synchronization module 230 manages this synchronization. When modifications are made to a native document in native document store 250, synchronization module 230 requests an updated preview from the preview generation module 200, saves the document preview in preview store 260, and disseminates the modified document to client devices 110 synchronized to the native document. If other client devices have made modifications during the same time when the preview was updated, this dissemination may be rejected by the document preview system. The client may then retry the same update, reapplying the changes to the new version. The modifications to the native document may be performed by a user modifying the document via the document preview module 210 or may be received from a client device 110 that has made a change to the native document using a native application.
Document preview module 210 provides preview documents to client devices 110. When a user requests a preview of a native document, document preview module 210 retrieves a preview document from preview store 260. The document retrieved from preview store 260 may also be associated with a version of the native document from which the preview was generated. As indicated further below, the version may be used to determine whether users are updating a native document relative to the most recent version of the document stored at document preview system 100. The requesting client device 110 receives the preview document from document preview module 210 and provides the preview document to the operator of client device 110.
Client device 110 may also provide the user with an interface to modify a value or formula in the preview. The user selects a portion of the preview and modifies a selected element in the preview using the interface. When the modification is received, client device 110 provides the modification and an identification of the field in the native document to which the modification pertains. The interface may also permit a user to add or delete a row or column of data. Client device 110 may determine the field for the modification based on the field mapping. Client device 110 may also indicate a version of the preview file that the edit is applied to by the client device 110. In certain circumstances, versions of a native document edited at different locations may have different data. In that event, the version is used to determine which edit to apply to the document. For example, an edit received by the document preview system 100 that indicates a version of the document that is older than the current version stored at the native document store 250 may not have its edits applied to the native document. Instead, the new version of the document may be retrieved by the client device from the native document store 250 and the client device may attempt to reconcile the changes and may request instructions from the user on the reconciliation if necessary. Alternatively, the system may be configured so a field is an atomic unit of data and an edit to that field replaces all text for that field by the last writer to the document. In this configuration, conflict resolution replaces the entirety of a given field with the last written value and requires no user prompting.
Next, the version of the modified document may be verified to verify that the client device is submitting a modification of a current document. The document preview module 210 queries the version of the current document for comparison with the version of the native document stored in the native document store 250. When the version does not match, the current version of the native document may be sent to the client device to perform conflict resolution between the current version and the version to which the modification was made. This conflict resolution may also be performed on the document preview system 100 using the last writer per cell method described above or by other means. During the process of conflict resolution, a newer version of the document may be uploaded by other clients to document preview system 100. Client device 110 may receive an error code from document preview system 100 to signal a conflict between the version uploaded to the document preview system 100 and modifications being applied by the client device. Client device 110 may re-attempt to submit the modification until no error code is received.
This reconciliation may be performed using an operational transform. For example, to reconcile modifications to a column or row of the native document, client device 110 determines whether an edit to be applied was affected by the row or column modification. For example, a client device 110 may have received an edit to a field from the user, and when the client device 110 attempts to save the edit, identifies that a newer version of the document has a modification to the column or row of the native document. To apply the edit (which references an older version prior to the row/column modification), client device 110 determines whether the edit is affected by the row/column modification. The edit may be affected by being applied to an affected field, or by referencing an affected field in a formula. For example, an edit originally intended for field F8 is affected if a new column is added in between columns B and C, and the edit may now be applied to field G8 by modifying the column of the intended edit. Alternatively, if the same edit also references field K10 for a formula, that cell in the formula is identified to determine whether field K10 is affected. In this example, the field is affected and the reference in the formula is altered to reference L10 and account for the added row in the native document.
When an edit is applied to a column that was deleted by another edit, the edit may not be applied to the native document. When an edit to a field references a deleted row or column (e.g., in a formula), the edit may be altered to reference a null field, or may be altered to reference the field, if any, that replaced the deleted field. For example, if row 15 is deleted, row 16 may be renumbered to row 15 and the reference modified to the renumbered row.
In certain configurations, the version verification is omitted. Next, the modification is applied 520 to the native document, for example by document manipulation interface 220. After applying the modification, an updated preview document is generated 530 by the preview generation module 200. The updated preview document includes updated values, formulas, preview code, and so forth to update the preview with respect to the modified content item. Thus, the application of the modifications to the native document and generation of the updated preview document 530 permits the updated preview document to account for any changes to fields or graphs that are calculated using the modified field. Next, the updated preview 540 is sent to the client device 110 for display to the user.
In one embodiment, prior to saving the modified native document and notifying synchronized devices of the modification, the modified native document is again checked against the current version of the native document to determine 550 a version match. For example, the synchronized native document may have changed and a new version created while the present native document is modified 520 and an updated preview generated 530. When the versions do not match, the client device is signaled 570 to resolve the conflict with the new version at the document preview system 100.
Finally, using the modified native document, the modified native document is saved to native document store 250 and synchronized 560 to client devices via synchronization module 230 after the conflicts have been processed and no error code is generated. In this way, modifications to a native document performed by client devices may be easily incorporated into the document preview system, despite that the modifications are performed on a browser or other application that is not normally configured to manipulate the native document.
In one embodiment, the document preview module 210 generates an updated preview to the document even when the document version is not verified as being current. In this embodiment, the version of the document that is referenced by the client is retrieved and modified as requested by the client device. That modified content item is sent to the requesting client device for display to the user, permitting the user to update and revise content items that may not be fully synchronized.
The client device 110 receives a request from a user to preview 600 a native document. The user of the client device 110 may designate the native document on a browser exploring native documents on the document preview system 100, or the client device 110 may view content items stored at the client device 110.
After requesting the preview, the client device 110 receives the preview document and renders 610 the preview document as specified by the preview document. Next, a user may select 615 an element in the preview, for example a particular cell in a table. When a user selects a cell, the client device 110 replaces the value of the cell with the formula defining the value. When there is no formula, the value itself may be displayed. To display the formula, the client device 110 identifies the formula associated with the selected field 620. In one embodiment, the formula for a field is presented as an input element associated with the element in the table. The identified formula is displayed 625 to the user.
When a user modifies an element, client device 110 attempts to commit 710 the changes to document preview system 100. Client device 110 identifies an element modified by the user and an associated field in the native document. The field is identified by consulting the field mapping for the modified element. The field and its modified value are stored by the client device 110 and may be maintained until changes are successfully committed 710. The edits may also be stored as a list of changes until the commit occurs. Until the commit occurs, the client device 110 may also trigger a warning if a user attempts to browse or leave the page of the preview. Since the preview is typically presented in a browser format, leaving the browser page may cause a user's changes to the preview to fail to be committed to document preview system 100.
When the modified changes are received by document preview system 100, document system 100 applies the changes to the native document and generates an updated preview document, which is received 720 by the client device.
In addition to this path for committing changes, another method of modifying the document may be performed to improve responsiveness to the client by generating a preview and permitting a user to continue editing prior to completion of a commit to the document preview system 100 or receiving updated preview document 720. In this alternate path, the preview is modified as it would appear on the native document by applying edits and accompanying formulas to the preview. In one configuration, client devices are configured to modify a single cell edited by the user as a fast preview, while in another configuration other clients are configured to include more extensive evaluation code to apply dependent formulas to the edits using the formula list and table mapping. Furthermore, client devices 110 may also be configured to download that native document from the document preview system 100 or the client device 110 and use native code to display the updated document including updated graphs, charts, and formula values. To perform the preview at the client device 110, the client device 110 may perform functions of document manipulation interface 220 and preview generation module 200 to apply the modification to the document and generate a preview therefrom. The local version of the document is modified 740 based on the user's modifications to the element, and an updated temporary preview document is generated 750 by the client device 110.
By using both the local path and the remote path for modifying the document, the client device 110 is able to quickly present modifications to the user, and also to provide the document for a commit to the native document store 250.
When an updated preview is received by the client device 110, the updated preview may be generated in a hidden iframe. The hidden iframe permits the preview to be generated 760 and thereby rendered on a hidden (or off-screen) portion of the display of the client device 110. When the preview is completely rendered, the client device 110 determines a context of the user's interactions with the native document. The context may indicate, for example, the user's cursor position, typing characters, etc. When the client device displays the iframe, it swaps the hidden iframe with the currently shown preview and also swaps the context to the context of the user prior to replacing the preview. In this way, the amendments to a preview can be quickly and easily applied to the document within a refresh cycle to provide an interactive native-quality experience.
Using the techniques of this disclosure, the system may provide users with a convenient way to modify native documents within a browser. In addition, the users may modify native documents within a browser window and quickly save those modifications to the native document.
The foregoing description of the embodiments of the invention has been presented for the purpose of illustration; it is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Persons skilled in the relevant art can appreciate that many modifications and variations are possible in light of the above disclosure.
Some portions of this description describe the embodiments of the invention in terms of algorithms and symbolic representations of operations on information. These algorithmic descriptions and representations are commonly used by those skilled in the data processing arts to convey the substance of their work effectively to others skilled in the art. These operations, while described functionally, computationally, or logically, are understood to be implemented by computer programs or equivalent electrical circuits, microcode, or the like. Furthermore, it has also proven convenient at times, to refer to these arrangements of operations as modules, without loss of generality. The described operations and their associated modules may be embodied in software, firmware, hardware, or any combinations thereof.
Any of the steps, operations, or processes described herein may be performed or implemented with one or more hardware or software modules, alone or in combination with other devices. In one embodiment, a software module is implemented with a computer program product comprising a computer-readable medium containing computer program code, which can be executed by a computer processor for performing any or all of the steps, operations, or processes described.
Embodiments of the invention may also relate to an apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, and/or it may comprise a general-purpose computing device selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a non-transitory, tangible computer readable storage medium, or any type of media suitable for storing electronic instructions, which may be coupled to a computer system bus. Furthermore, any computing systems referred to in the specification may include a single processor or may be architectures employing multiple processor designs for increased computing capability.
Embodiments of the invention may also relate to a product that is produced by a computing process described herein. Such a product may comprise information resulting from a computing process, where the information is stored on a non-transitory, tangible computer readable storage medium and may include any embodiment of a computer program product or other data combination described herein.
Finally, the language used in the specification has been principally selected for readability and instructional purposes, and it may not have been selected to delineate or circumscribe the inventive subject matter. It is therefore intended that the scope of the invention be limited not by this detailed description, but rather by any claims that issue on an application based hereon. Accordingly, the disclosure of the embodiments of the invention is intended to be illustrative, but not limiting, of the scope of the invention, which is set forth in the following claims.
Number | Name | Date | Kind |
---|---|---|---|
6988241 | Guttman | Jan 2006 | B1 |
20020082857 | Skordin | Jun 2002 | A1 |
20050050088 | Kotler | Mar 2005 | A1 |
20070233811 | Rochelle et al. | Oct 2007 | A1 |
20100174783 | Zarom | Jul 2010 | A1 |
20120110515 | Abramoff | May 2012 | A1 |
Number | Date | Country |
---|---|---|
WO 0198928 | Dec 2001 | WO |
Entry |
---|
PCT International Search Report and Written Opinion, PCT Application No. PCT/IB2016/050479, dated Apr. 5, 2016, 11 pages. |
Number | Date | Country | |
---|---|---|---|
20160224517 A1 | Aug 2016 | US |