-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List Navigation Reorder #19
Comments
Not impossible if you can figure out the system atom uses for rendering. I
wasn't a fan and could barely make things show up on the screen much less
reorder, but if you took to it I don't see why not. I wanted to be able to
reorder.
…On Mon, Sep 4, 2017, 9:29 AM Jesse Bostic ***@***.***> wrote:
Allowing for reorder of scenes from list navigation window. I'm willing to
look into it myself, but I haven't done any Atom package work before... So,
looking for a complexity rating and feasibility assessment.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIVf1Mo2xEOD-dKUUVjlFZ6GidbF-VsUks5sfCWGgaJpZM4PMGqe>
.
|
Okay. Well, I'm looking at your original pull request code now to get familiar with that piece. I probably have a ways to go, just because I'm new to both atom package dev and coffeescript. But, we'll see. It can't be too incredibly difficult. The overview list items need to be drag/drop, determine where it was (beginning to end), remove and add contents at new index. I'm sure it won't be that easy... but... sounds good when I say it like that... :) |
So far, so good. Using sortablejs node module to reorder items. Looks like the next step is writing out a new file and replacing old when item is moved. At least, that's how I'll do it to start off with. I'd like something more efficient, but I just want to get the basics working first. I may need some help wrapping my head around the way the project is managing dependencies/imports though. I've got those coming in fine... but I'm sure there's something I'm missing for the final draft. Will include you in a code review once it works. |
Alright. Got it working! Will clean up and submit for review soon. |
See Pull Request #20 ... still some cleanup needed, but that's the general picture. |
So, I've done my best to build off of the work that you had done there, morekitsch. I also added some unit tests. |
@morekitsch About the clip on the README.md? I just noticed it. Is that how outline view is supposed to look? Making me nervous... cause all I've seen is a straight up list of items. |
Yeah It's supposed to look like that. The attached fountain files have
that. The birthday one. The trick is that I'm using the outlining feature
of fountain (using ##hash levels). The 'birthday' fountain file has some
complex outline nestings and that is the type of thing that should be in
any unit test.
I used a lot of recursion to accommodate an arbitrary number of levels.
though in typical usage I think 6-8 what is likely to occur. You drag and
drop feature is super exciting for me. When I first wrote about these
feature I hoped ot get that in as well, but I had a lot of trouble with the
display interface (I wasn't familiar with it, in fact I used to doing
thinsg with raw HTML or Reach, but pretty much nothing else, into even
Jquery, so the idea of getting drag and drop working was way off for me.
I'd always hoped Atom would update it's display layte with something like
Vue or react). Anyway yeah there shouldbe nesting :) Nesting and comments
(set by a '=' equal sign at the head of a new line
What is was going for was the outline features from http://slugline.co/
I primarily use PC and linux and so I was always disappointed that slugline
was OSX only and thought this Atom module was the most approachable way to
get those functions.
Anyway, thanks for the hard work. You obviously have a current set of
skills, and work super fast. I look forward to testing things this weekend.
…On Thu, Sep 7, 2017 at 10:26 PM, Jesse Bostic ***@***.***> wrote:
@morekitsch <https://github.com/morekitsch> About the clip on the
README.md? I just noticed it. Is that how outline view is supposed to look?
Making me nervous... cause all I've seen is a straight up list of items.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIVf1EKhGycS-sUoMREfMwsoZY0NGgjEks5sgNACgaJpZM4PMGqe>
.
|
Well, thanks for the complimentary tone. :) But apparently (after reviewing)... I work faster than I think. Looks like I skipped over some important details here. I was working with a flatter structure, not realizing the support for nested elements... even though I noted it in the code. Could be an easy update, but I'm not counting on it. There's probably some tough questions to answer among the rubble. Then there's tests... Anyway, do delay manual testing on this. I'll need more time. On the plus, side, I'll push forward with my pdf export pull request sooner... |
@morekitsch So, I've spent a little time mulling over the challenge of doing this thing all the way through... and I just wanted to jot it all down... for reference, clarity, feedback, posterity... whatever it amounts to. Yikes: Details: Consideration: Up until now I was framing the problem as a hierarchical issue because of the way formatting is (quite logically) applied to the html. But... maybe it doesn't need to be that way... maybe we can flatten the display hierarchy... give all the current fountain elements their own list item (with line numbers and all of that) inside of a single HTML list... and then apply CSS classes to mirror/approach the current appearance. Then blocks would be defined simply by their start and end lines, so they could all be managed individually. And sortablejs can do that. However, this would create a problem for moving parents in the visual hierarchy. They would not migrate their children naturally with sortablejs. But we could then select all lines between the dragged parent and its next sibling element... and move them simultaneously... again, based on CSS. Can you think of any reason why that wouldn't work? |
It's been a long time since I wrote my code so I should double check, but I
recall that I go in a few phases. The first is recursion to essentially
generate a record of each level and line numbers. The second phase was to
wrap it up with corespondent HTML.... I didn't want to do this, but I had
so much trouble with the display layer blowing up on me that it seemed one
big object to loop through was the only solution.
What I'm saying from all of this is that somewhere in there is a nice flat
list with line numbers and levels recorded as a single object. You could
probably work with that and toss out my display stuff making note of the
CSS classes of course.
Bear in mind I woke up entirely too early and I haven't looked at the code
in over a year, but I do think there is essentially a flat list of some
form in there for you to work with.
…On Fri, Sep 8, 2017 at 1:26 AM Jesse Bostic ***@***.***> wrote:
@morekitsch <https://github.com/morekitsch> So, I've spent a little time
mulling over the challenge of doing this thing all the way through... and I
just wanted to jot it all down... for reference, clarity, feedback,
posterity... whatever it amounts to.
*Yikes:*
Yea, so, I've been looking over and analyzing what it would take to do
this... and do it well... and I'm a little daunted by the task. I've come
across a couple available solutions with *some* of the necessary
functionality, but they're all pretty shady. People are trying to do it and
struggling... or there just aren't the right configurations for this use.
*Details:*
The dep I was using, sortablejs, supports flat list structures... but even
if I used it recursively, it wouldn't allow for dragging scenes across acts
and whatnot because it relies on a singular list model for each instance.
What we would actually need for this is to enforce *some* hierarchical
relationships strictly, but also keep it loose in other tiers (so acts
couldn't be dropped into scenes but scenes could be moved between acts and
such). This sounds really hard. Especially on the testing side.
*Consideration:*
But maybe the problem here is preconceptions about the real problem.
Up until now I was framing the problem as a hierarchical issue because of
the way formatting is (quite logically) applied to the html. But... maybe
it doesn't need to be that way... maybe we can flatten the display
hierarchy... give all the current fountain elements their own list item
(with line numbers and all of that) inside of a single HTML list... and
then apply CSS classes to mirror/approach the current appearance. Then
blocks would be defined simply by their start and end lines, so they could
all be managed individually. And sortablejs can do that.
However, this would create a problem for moving parents in the visual
hierarchy. They would not migrate their children naturally with sortablejs.
*But* we could then select all lines between the dragged parent and its
next sibling element... and move them simultaneously... again, based on CSS.
Can you think of any reason why that wouldn't work?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIVf1KamFf8OBRjhqv-NbHImV3DhBlgEks5sgPpIgaJpZM4PMGqe>
.
|
@morekitsch Good news! Looks like you may get to give it a try this weekend after all. I used the approach described above and it was successful. A few minor tweaks to formatting, adding a dynamic class for depth, and a custom flattening of the scene data structure. Looks nearly identical to my eye. The only caveat is that I haven't yet implemented the piece to drag "children" automatically with their visual "parents". Since what I've done so far is more stable and better tested... and dragging children adds a number of new behavioral questions... I'm hoping to delay that work for a future branch as an additional feature. Another reason for this is the testing itself. I'd like more time to think about (1) what the desired behavior is and (2) how to effectively test it... before doing significantly more work. My personal view, at this point, is that it makes sense to split that into another unit of work. My hope is that I'd be able to get this branch in, then get the pdf export branch in (which just needs a few tests now), and then return to the outline view issue. @ |
I was just able to check your work. It' super cool. I like the lock, though if I had a choice i'd color it so it's clear that it's a toggle of sorts. I didn't realize I thought it was part of the title for a minute when I first opened it up. Of course updated docks could help this. This is all very cool. I did find a bug however. When I click on a section that is off screen (needs to be scrolled too) the app wont scroll unless I click in the edit-pane. Then since I clicked there I lose my focus so the line is no longer highlighted. As long as there is no scrolling involved things work normal. I think you must have set thing to not scroll unless the editor is active. That is fine as long as clicking to make the editor active doesn't lose my highlighted section. |
Ya know, changing the icon color probably wont make it look more like a button. We can just make a better readme. |
Hey thanks. Wouldn't have been possible without your work, and team support. I actually experimented quite a bit with different icon arrangements... my favorite from the octicons set was the original red "X" overlaying the lock. But... that was problematic. I did make an attempt to contact the octicon people and query about an "unlock" icon, although I'd bet that the issue will just be closed. If all else fails, I was hoping to look at font awesome or something that has icons that speak for themselves. To be continued... As for the scrolling bug... I'm not seeing that behavior. Are there any console errors being thrown or anything like that? I actually made no changes to the logic there... but definitely let me know if there is something I can do to reproduce it? @superlou have you seen this? |
Ugh, Did a restart and thing works great. I should have known better, duh.
If you really want an custom icon-font and don't mind having another asset
in the repo I can make one. I don;t mind the key at all though.
I'll make a new screen shot in the next 4 days and I can update the
readme.md (going away fro the weekend), any special changes that aren't
visual I should call out?
…On Thu, Sep 28, 2017 at 7:14 PM, Jesse Bostic ***@***.***> wrote:
Hey thanks.
I actually experimented quite a bit with different icon arrangements... my
favorite from the octicons set was the original red "X" overlaying the
lock. But... that was problematic. I did make an attempt to contact the
octicon people and query about an "unlock" icon, although I'd bet that the
issue will just be closed. If all else fails, I was hoping to look at font
awesome or something that has icons that speak for themselves. To be
continued...
As for the scrolling bug... I'm not seeing that behavior. Are there any
console errors being thrown or anything like that? I actually made no
changes to the logic there... but definitely let me know if there is
something I can do to reproduce it? @superlou
<https://github.com/superlou> have you seen this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIVf1CCFKQBUxHc2MqTpcJ2UcE4qJT9wks5snFJ_gaJpZM4PMGqe>
.
|
Also, I see your in Tacoma. I'm in Seattle. Do you shoot films or just
dabble in screenplays? I'm always looking for people to do projects with
and I dig Tacoma (Legendary donuts rule).
On Thu, Sep 28, 2017 at 11:26 PM, Jason Fortman <morekitsch@gmail.com>
wrote:
… Ugh, Did a restart and thing works great. I should have known better, duh.
If you really want an custom icon-font and don't mind having another asset
in the repo I can make one. I don;t mind the key at all though.
I'll make a new screen shot in the next 4 days and I can update the
readme.md (going away fro the weekend), any special changes that aren't
visual I should call out?
On Thu, Sep 28, 2017 at 7:14 PM, Jesse Bostic ***@***.***>
wrote:
> Hey thanks.
>
> I actually experimented quite a bit with different icon arrangements...
> my favorite from the octicons set was the original red "X" overlaying the
> lock. But... that was problematic. I did make an attempt to contact the
> octicon people and query about an "unlock" icon, although I'd bet that the
> issue will just be closed. If all else fails, I was hoping to look at font
> awesome or something that has icons that speak for themselves. To be
> continued...
>
> As for the scrolling bug... I'm not seeing that behavior. Are there any
> console errors being thrown or anything like that? I actually made no
> changes to the logic there... but definitely let me know if there is
> something I can do to reproduce it? @superlou
> <https://github.com/superlou> have you seen this?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#19 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AIVf1CCFKQBUxHc2MqTpcJ2UcE4qJT9wks5snFJ_gaJpZM4PMGqe>
> .
>
|
Well, I think @superlou was on the track to update readme and release after PDF creation was in. Of course, I don't mind either way as long as docs are in sync with released version. This dilemma actually had me wondering about the pros/cons of having a develop branch. Regarding the icon... Since the lock is an svg it would probably be quick work to modify the original into an "unlock". The only potential issue I foresee is width. It could mean that two new graphics would be needed if we wanted to avoid a jarring visual jump on transition. Or maybe css could be applied to give the appearance of equal width. It's an odd situation because the key and lock are logically complimentary, but not as intuitive as a lock and unlock combo. In response to the personal note... I guess I'm more of a dabbler. What I've been using fountain for isn't even strictly film related. Embarrassingly, I've been working on a dystopian graphic novel script and preferred the more structured approach. But I'm also FT software engineer and married with 3 young kids, so a lot of my extra creative energy/time has been getting funneled into the coding work. What kind of projects are you interested in? (Also, I used to live on the same block as legendary donuts, so I hear ya!) |
I'm fine with updating the readme sooner rather than later. It was more that I was planning to release the next minor version after the PDF stuff is in, so it would need to be updated at that point. |
Oh, right, because tagged versions still carry appropriate docs for that point in time. I was worried that people would see the readme and wonder why the feature wasn't present on their newest version. Got it though... My misunderstanding. |
@morekitsch Just wanted to let you know that I fixed the panel header for the outline view (while I was integrating PDF button), and in the process I moved back to the red X overlay for "unlocked" indicator. An open lock would probably still be better... but I didn't want it to come as a surprise if you did end up doing work on that. |
Was camping, but I’m happy to do.it. Also a reply two or things one: I
totally get a lack of time, I have done anything in a year or so project
wise. That’s one of the reasons I want a good fountain editor that’s cross
platform so I can write wi h no compromises when I find a chance. And two:
post apocalyptic graphic novel, very cool!
Also while I’m here I’d like to say I’m happy you looked at after writing
it has the best page formatting of all the JavaScript versions by far. I
didn’t think the source was available, guess I didn’t look hard enough.
Good choice though precision formatting is super important.
…On Mon, Oct 2, 2017 at 11:13 PM Jesse Bostic ***@***.***> wrote:
@morekitsch <https://github.com/morekitsch> Just wanted to let you know
that I fixed the panel header for the outline view (while I was integrating
PDF button), and in the process I moved back to the red X overlay for
"unlocked" indicator. An open lock would probably still be better... but I
didn't want it to come as a surprise if you did end up doing work on that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIVf1CaOaZIoOFEpZM4DM-i2H0-I-4Eeks5sodB5gaJpZM4PMGqe>
.
|
Yea, one big dream of mine (with the Afterwriting piece) is to add support for end users to configure output formatting... #27. That would add some versatility for sure... plus its kind of a freebie from the tool. |
Closing with the merge of the basic functionality. Thanks! |
Allowing for reorder of scenes from list navigation window. I'm willing to look into it myself, but I haven't done any Atom package work before... So, looking for a complexity rating and feasibility assessment.
The text was updated successfully, but these errors were encountered: