Code Monkey home page Code Monkey logo

editablecell's People

Contributors

gnab avatar jstclair 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

editablecell's Issues

Re-write landing page

Things I think need clarification:

  • connection to Knockout
  • other "default" features. There's no mention of advanced navigation or selection shortcuts, control-enter behavior, or copy-paste in either landing or demo pages.
  • show full range of bindings
  • styling tips

Clarify version

I'm assuming we want to follow semantic versioning because we're down like that?

At least according to the spec, if you've got a version in production, you're already at 1.0.0. So perhaps we should bump the major of master to 1, and (when/if) we promote develop to master, mark that 1.1?

Publish via NuGet

I've signed up for a free MyGet subscription (for open-source contributors) which is how @object builds his Simple.OData.Client library.

More idiomatic Javascript?

Working on a small side-branch to look at more modern javascript styling. Wonder what you think?

See, for example, selection.js

Took a while to figure out some of the scoping issues. One of the things it helps clear up is where editableCell was relying on implicit this being set in kinda-confusing ways. Note that in the above, I did convert all the functions to hang off the prototype (for ease in conversion), but obviously some of the ones which don't have a dependency on range, etc., could go back to being stand-alone functions.

I'd also like to bring in some of the bite-size pieces of lodash to simplify some of the iteration, etc.)

Comments?

Allow setting null

Once a value is written by editableCell, there's no way to return to a null value. For some implementers, null is a valid value, and we should provide a key/key combination to signal "write a null back"

Note that this doesn't mean that the underlying observable's validation will be bypassed. If you use an knockout extender, for instance, that ensures the observable is a number, you'd need to either:

  • modify the extender to allow nullable numbers
  • create a new nullableNumeric extender
  • continue on, and the attempt to write null would be treated like attempting to write 'A'

Copy images not only text

I have a request regarding the simple copy function via a normal shortcut.
If I have a image in a html table with a simple img balise, this balise refer to this image via a link, In a normal html table I can copy paste and I will get the image copied as well. In editableCell I have nothing.

Do you think it would be possible to implement this ?

Thanks for the great job.

Clarify name

The repo is 'editableCell', The docs say 'knockout.editableCell'. For things like bower and npm, we should agree on the general name.

The main issue going forward is whether the name should reflect the connection to knockout or not. I know @gnab was planning to disentangle some of knockout.

In addition, at least in bower, a lot of packages are 'ko-{something}'.

Use explicit publishing "step" to include output

In managing my other project, I looked at the Knockout build steps, and they have something similar to the following (except included as a Grunt task, so the version is automatically determined by tweaking the bower.json):

To publish, run:

git add bower.json
git add -f out/*
git checkout HEAD
git commit -m "Version {version} for distribution"
git tag -a v{version} -m "Add tag v{verson}"
git checkout master
git push origin --tags

This allows them to exclude the out/dist folder completely, and then just include it (without affecting future commits) only for the tags.

Thoughts?

Issue when loading Knockout via AMD

Hello!

We have an issue when loading Knockout via require; editableCell fails to load, since it expects ko to be a global (i.e., window) variable.

I've created a minimal reproduction of the problem here: https://github.com/jstclair/ec-amd-bug

After cloning the repo,

  • Ensure you have the right npm globals installed:
npm install -g gulp typescript bower http-server 

The last one is optional, but I'm going to assume it's installed later.

  • Install local and bower deps
npm install
bower install
  • Build the site using gulp
gulp
  • Start http-server for the src/ folder (will work because of our tremendous hack)
http-server src/

Open a browser to http://localhost:8080/

EditableCell is working! This, however, is due to the preEditableCell.js script (in the src/vendor folder) and a shim (in the src/app/require.config.js file).

  • Quit the previous http-server instance, and run it from the dist folder.
http-server dist/

Opening a browser, you will see it doesn't work.

Espen and I have cloned the editableCell repo and tried to change options in the browserify config in order to force editableCell to externally require knockout, but the only thing we've been able to accomplish is including the entire knockout.js script in editableCell (not our preferred solution).

Any help would be greatly appreciated!

Bower package

Should create a bower and publish a bower package

Clarify license

Is there an explicit license associated with editableCell? Shouldn't we do that?

Handle hidden cells

Hidden cells should:

  • not be included in the selection range
  • not be navigatable

When the focused cells becomes hidden (blur + offsetHeight == 0), the first visible cell above it should get the focus.

Extensibility when navigating inside a "virtual" table

Some implementers have implemented a virtual table; navigation of editableCell depends upon the ability to find the previous/next row or column. It would be nice to bake in a extensibility model here, so implementers can communicate with the bounds checking in editableCell and adjust their current "virtual" posiition before editableCell decides it can't move further.

Cannot find module 'knockout'

I'm trying to use this plugin in a node-webkit project and I'm using RequireJS to load all of my dependencies. After adding editableCell to the project I get:

"Uncaught Error: Cannot find module 'knockout'", source: module.js (338)

It looks like the Require code setup doesn't work with the option of leaving "require" to nodejs and using "requirejs" instead.

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.