Coder Social home page Coder Social logo

mslegrand / pointr Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 3.55 MB

A shiny-based IDE for creating SVG by using R and the svgR package.

License: Other

R 19.34% JavaScript 6.21% CSS 0.93% HTML 73.48% Vim Snippet 0.03%
shiny shiny-apps svgr svg-editor r ide ace-editor graphics

pointr's People

Contributors

mslegrand avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

jimsforks

pointr's Issues

modify shinyFiles to be used for file io.

shinyFiles requires a button, but pointR uses menu. One approach would be to modify the shinyFiles and integrate the resulting javascript/R directly into pointR.

should a .R file use ptR mode?

Currently .R files are internally using .ptR mode. This results in parsing as .ptR, which produces undesirable effects:

for example when creating a custom control, we might have
tagList( singleton(tags$head(tags$script(src = "widgetCntrl.js"))), div( id=inputId, newWidgetCntrl(WH=wh, inputId=inputId, theta_0), "data-theta"=theta_0, class="widgetCntrl" ) )

But a warning is issued that src is not an attribute of tags$script.

To fix either

  • use the usual R parser as in shinyAce or

  • fix the ptR-ace parser to ignore this.

Additionally, the dnippets bar appears, with options not appropriate to an plain R file

drag screen, allow to drag a single point.

The issue is to be able to select a tagged set, and then drag the points (one at a time) in that set. Currently, points picks the highest index at a given location, value does too. This is because we allow tag selection using point and click. Only the drag screen disables the point and click tag selection. So the best approach is to modify the drag screen to drag either a group or a single point.

mouse click selects next point rather than this point

when the mouse click is used to select a point, it selects the next point rather than the point that was just clicked. This is counterintuitive, especially when trying to insert an intermediate point in a polyline.

Autocomplete needs better scoring

Most needed attributes should come first.
One approach

  1. custom attributes first (i.e. cxy, rxy, xyz, ...)
  2. regular attributes second
  3. presentation attributes third
  4. content elements forth

Incompatability with shinyFiles

There appears to be an issue with incorporating shinyFiles into pointR. The problem seems to originate within the svg plots. I can only speculate at this time, but this is probably a symptom of a serious issue, yet to be discovered.

R files with no commit button cannot be saved

R files with no commit button cannot be saved

This issue arises because a file is flagged as modified only after a change has been committed.
Consequently, any changed to an app.R, or any *.js cannot be detected because of a lack of commit button.
To solve this we can either introduce more buttons (yuk) or notify the server when ever a notSaved status changes. A notSaved status would be sent whenever the value of undoStack.length>0 changes.

After commit, cannot undo

This is a design issue. Will need to rework how code is updated after point/transformation edition.

auto resizing

We should have the window resize accordingly.
What this would entail is:

  1. ace editor and graphics resize accordingly
  2. splitter maintains its proprotional position
  3. No wrapping!!!

Fix save file dialog box.

The current implementation uses file.choose, which looks good for opening, but not for saving. In particular, the button is open, not save. There must be a better widget to do this.

snippets

snippets has been disabled. Need to reinsert snippet capabilites

Need to submit to accept missing ptR data or even plain R

load R file and submit should not reject (and undo) just because of a missing svgR or ptR.
If svgR is return, should graph it.
If no ptR, then do not provide editor selection of points, but still should graph (assume no error)
If plain R, just output the console out.

newPage and ptRAce

currently all new pages go through ptRACE

  • We need to reroute for javascript support
  • Some code, such as select null has been disabled. should be reenabled
  • dragndrop for javascript,
  • bookmarks are not working

slider input presentation

slider input not very readable

  • numbers at bottom are clipped

  • background should be white to improve visability

Change the tagging behaviour for frequency >0

Proposed changes to tagging frequency

  1. Tag frequency is set (fixed) during the first tagging operation.
    In particular, when first tagged, a popup modal will ask for frequency and
    confirmation.
  2. If the tag frequency is set to a period p>0, (aka. periodic tagging) then all subsequent
    indices that are 1 mod p are to be tagged.
  3. Periodic tagging makes no exceptions, thus deleting a point or inserting a point does not change the indices, (unless at the end).
    Rather the points associated with the tags, change instead.
    In particular, if a tagged point is deleted, the next point becomes tagged, and the tagging data frame remains intact except for possibly
    the last row. If the tag index of the last row exceeds the number of points, that row is deleted. A similar situation occurs for insertion
    of a point.

Note Requirement 3, appears simpler, but actually creates a new case. Formerly, both manual and periodic
inserts and deletes were handled identically (except for the addition of a tag when necessary). Now they are not.

Implementation changes required for the above

  • 1. modulePointsBar tagFreq selectInput, becomes an output (readonly)
  • 2. serverMouseClicks::observe input$mouseMssg : cmd= add, delete are to be rewritten
  • 3. serverPlotBarPoints::observe pointInfoList$tagFreq() needs to be rewritten
  • 3A. popup modal to ask for frequency and confirmation
  • 3B. tag button is hidden (or disabled) for freq>0.

warning

Warning in stri_match_first_regex(string, pattern, opts_regex = opts(pattern)) :
argument is not an atomic vector; coercing

No clue where in the code this is coming from.

Need to add snippet viewer and editor

Currently user must view/edit snippets with another application (text editor). To make snippets more usable, we need to intergate a snippet editlr

Need fix so that script element will not create conflicts

pointR is already using the script element, so if a user creates a script element, we need to intercept that and merge it's content with the pointR script element. Also when doing this, one needs to handle any potential conflict in variables and or functions.

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.