IRC log of #schooltool for Monday, 2011-06-06

*** alga has quit IRC00:59
*** aks has joined #schooltool05:09
*** aks has joined #schooltool05:09
*** th1a has joined #schooltool06:13
*** th1a has quit IRC07:27
*** menesis has joined #schooltool08:55
*** alga has joined #schooltool09:30
*** yvl has quit IRC12:03
*** menesis has quit IRC12:12
*** yvl has joined #schooltool12:14
*** alga has quit IRC12:32
*** menesis has joined #schooltool13:08
*** alga has joined #schooltool14:05
*** aks has quit IRC14:21
*** replaceafill has joined #schooltool15:12
*** th1a has joined #schooltool15:28
yvlgood morning guys15:28
yvlI'm running a bit late today15:28
yvlif you could just give me 5 more minutes ;)15:28
yvl(to commit latest changes)15:28
replaceafillyvl the last change to the Makefile throws me an error on run15:29
replaceafillTraceback (most recent call last):15:29
replaceafill  File "bin/start-schooltool-instance", line 154, in <module>15:29
replaceafill    schooltool.paste.run.main()15:29
replaceafill  File "/home/replaceafill/.sandboxes/flourish/src/schooltool/paste/run.py", line 100, in main15:29
replaceafill    update_instance(instance_root)15:29
replaceafill  File "/home/replaceafill/.sandboxes/flourish/src/schooltool/paste/run.py", line 60, in update_instance15:29
yvlyes15:29
replaceafill    os.path.join(instance_root, 'paste.ini'))15:29
replaceafillOSError: [Errno 2] No such file or directory15:29
replaceafillah ok :)15:29
replaceafillyou're aware ;)15:29
aelknerreplaceafill, i had that one before and fixed it by copying paste.ini from another sandbox15:31
th1ahi replaceafill, aelkner, yvl, menesis.15:31
aelknermorning15:31
menesishu15:32
menesishi15:32
replaceafillgood morning/afternoon15:33
th1aOK, actually, I guess I can start while yvl is getting ready.15:34
th1aSo the main agenda today is:15:34
th1a* yvl overview;15:34
th1a* replaceafill CSS discussion;15:34
th1a(that is, replaceafill doesn't have to lead it, but he's going to be the one doing it)15:35
th1a* initial strategies/tasks for everyone;15:35
th1a* (post-meeting) replaceafill and aelkner talking more jquery dialogs and accordions.15:36
th1aThat should be more than enough.15:36
th1aAny initial questions or concerns?15:36
aelknerreal quick15:37
aelkneryou got my note about the hidden report sheets15:37
th1aYes, let's talk about that later.  I haven't really even looked at it closely tbh.15:38
aelknercan we get that merged and released in the short term to solve your friend's problem?15:38
th1aThat's the idea.15:38
th1aSo yes, later today we'll talk about it.15:38
aelknerok15:38
th1a...15:40
th1areplaceafill:  So did you check out accordions last week?15:40
replaceafillyes15:40
replaceafillagain, i don't like jquery ui accordions15:40
th1aAh, why not?15:40
replaceafillbecause they only allow one open at the time15:40
th1aOh...15:40
replaceafillbut i found two ways of having multiple accordions open: a hack and a plugin15:41
yvlbtw, meanwhile, please get the https://code.launchpad.net/~justas-pov/schooltool/flourish if you didn't already15:41
replaceafillyvl done15:41
th1arevision 2837?15:41
th1areplaceafill: tbh, we could even try the current implementation first.15:43
replaceafillth1a i think implementing accordions is really simple actually15:43
replaceafilli mean, our own accordions15:43
replaceafillyou just toggle an element when you click another15:43
th1aI imagine.15:43
replaceafillhttp://jqueryui.com/demos/accordion/ even tells you that at the end15:44
th1aWhy don't we just prototype with theirs first.15:44
replaceafillsure15:44
th1aOK.  yvl ready?15:44
yvlcoffee is almost done15:45
th1areplaceafill needs the coffee most.15:45
replaceafilli already had breakfast ;)15:45
replaceafillwith coke, no coffee :P15:46
th1aAt least it was good Coke made with sugar.15:46
replaceafill:))15:46
yvlready15:47
yvlso15:47
yvlthere is a test layout in src/schooltool/skin/flourish/resources/test.html15:48
yvlit will be my visual aid today :)15:48
yvlwell, where to begin...15:48
th1aHow should I be viewing test.html?15:49
th1aLooking at the source?15:49
yvlopen in browser15:49
yvlit should include necessary css15:49
yvlI think I sent you a screenshot of this recently15:49
th1aGot it.15:50
yvlthere are several "sections" in this page15:50
yvlthere's a top bar, basically a copy of our current top bar15:51
th1aBut location aware.15:51
th1aCorrect?15:51
yvlyes15:51
yvlthe only real difference15:51
yvlthing is, that in many cases we'll need to specify this in zcml15:51
yvlfor developers:15:51
yvlin the simplest case you can bind "active" location by context or layer15:52
yvlthe adapters traverse context by "getParent"15:52
yvlso if you say, that looking at ISchoolToolApplication is "School" tabl15:53
yvltab15:53
yvlall child objects are considered School15:53
yvland if traversal gets into IGradebook, and you bind the active tab to IGradebook15:53
yvlall "childern" will show the Gradebook tab active15:54
yvlthen there are breadcrumbs, obviously15:54
yvlgoing down...15:55
th1aLet's just move those into the red bar area now.15:55
th1aAnd perhaps change the color of the bar.15:55
th1aIf necessary.15:55
aelkneryvl, is test.html intended to become a macro at some point?15:55
yvlnot exactly15:55
yvlthere are be page templates that are essentially contents of test.html15:56
yvlflourish/tempaltes/  : main.pt and page.pt15:56
yvlbut I've opted to reduce amount of macros in SchoolTool15:56
* replaceafill likes the idea of the content template :)15:57
yvlin favor of content adapters15:57
yvlth1a, I'll do the breadcrumbs thing15:57
th1akk15:58
yvlcurrently I didn't do the breadcrumbs themselves though :)15:58
yvljust the manager implementation with no breadcrumbs registered :)15:58
th1aSure.15:58
yvlok, so on to the page title15:58
replaceafillquick question: are the breadcrums also based on traversal15:58
replaceafillor containment15:58
yvlhmm15:59
yvleach breadcrumb knows it's parent15:59
yvland is obtained by context, request, view15:59
replaceafilli mean, if you have schoolyear, term, section, will that show this hierarchy on the breadcrumb?16:00
replaceafillah16:00
yvlby default - yes16:00
replaceafillok, go on16:00
yvlbut the implementation is a bit different than the rest of them in Zope16:00
yvlrationale - Vitor said the breadcrumbs should make sense for the user16:01
yvland not by the actual hierarchy16:01
replaceafillright, that's why i'm asking :)16:01
th1aYes.16:01
yvlresemble, yes, but not limited by it :)16:01
th1aThat's partly why I got rid of them in the first place.16:01
th1aIf it just tells you where you are in the database that might be more confusing than nothing.16:01
yvltrue16:02
th1aActually, I'd prefer not to get hung up on that implementation right now.16:02
yvlsure16:02
th1aLet's just agree that there will be breadcrumbs.16:02
replaceafill:)16:02
th1aThat could even be implemented after the sprint if necessary.16:02
yvlall of the implementation is subject to change heavily at this point16:02
th1aSo for now a placeholder is ok with me.16:02
yvlgreat :)16:02
yvlso, the title, subtitle and object navigation16:03
yvlbasically, it works this way:16:03
th1aI'm anti-subtitle.16:03
yvlI imagine.16:03
yvlbut let me advocate it a bit16:03
th1aOK.16:03
yvlso, the title is kind of obvious16:03
yvlobjects have titles16:03
* th1a is not convinced title is necessary here.16:04
yvlapologies, I meant - "obvious what it does"16:04
th1aLet's assume it is there for now.16:04
yvlI just did it by guidelines16:04
yvlat the moment16:04
th1aWe probably need it.16:04
yvlagain - subject for discussion and change16:05
yvlthe next thing is subtitle and navigation16:05
yvlthese are mutually exclusive now16:05
th1aAh, ok.16:05
yvlsay, we are looking at a person16:05
yvl"tabbed" navigation over "contacts" "calendar" "overview" is kind of convenient there16:06
yvlbut when we click action buttons, like....16:06
yvladd person in person container16:06
yvlor edit person info in the person view16:06
yvland we get to the actual forms16:06
yvlwe have two options in my mind16:07
yvl1) modal JS popup form16:07
yvl2) non-modal page, without navigation, with subtitel16:07
yvlsubtitle :)16:07
yvlJohn Smith | Edit personal information16:08
th1aIt isn't clear to me what is going in Overview | Details | Stuff | Settings16:08
aelknerwhat is the subtitle?16:08
yvlaelkner: title is a title of the object; subtitle is a title of the page16:09
yvlth1a...16:09
yvlOverview | Details | Stuff works like tabs16:09
yvlwhen you press Overview, you get to the, well, person index.html16:10
yvlanother button could be Contacts16:10
yvlof a person16:10
yvlContacts are a "property" of a "person" object16:11
aelkneryvl, i branched and did a make on your flourish branch, should i be able to do make run?16:11
yvlin the eyes of the user16:11
th1aOK.  Let's make those look like Ubuntu navigation bars.16:11
yvlaelkner, yes16:11
aelkneri get a not found page at app root16:11
replaceafillcould they be like secondary navigation in the guidelines?16:11
th1areplaceafill:  Yes.16:11
yvlhmm16:12
yvlgimme a moment to look at guidelines again :)16:12
replaceafillpage 716:12
th1ap. 1916:12
th1a?16:12
replaceafillwell, page 7 is the complete layout :)16:12
* replaceafill goes to page 1916:12
th1a& 20.16:12
replaceafillah yes, more detail there ;)16:12
* yvl is trying to remember why it wasn't done by Ubuntu guidelines16:12
th1aTakes up more vertical space.16:13
replaceafillmaybe because of the login bar and breadcrumbs space?16:13
yvlah, now I remember16:13
th1aProbably we'll compress all that vertically somewhat.16:13
yvlthe reasons:16:13
yvl1) vertical space16:13
th1aWe may need a netbook layer  ;-).16:14
yvl2) top bar is taken by breadcrumbs16:14
yvl3) there are action buttons on top of content16:14
yvlthis was actually the result of merging Vitors work with Ubuntu guildelines16:14
yvlso this concept comes from Vitor's mockups16:15
th1aThere shouldn't be any other buttons on top of content after this navigation.16:15
th1aAnd I think in most cases this bar won't be there at all.16:15
th1ae.g., for persons we'll use accordions instead.16:16
yvl?16:16
yvlI mean - well, ok16:16
th1aAnd things like settings I'd prefer that to be in the side.16:16
th1aBasically instead of tabbing through views you'll switch content in the accordion.16:17
yvlinteresting thought!16:17
th1aOf course, that may actually suck and we won't use it, but I'd like to try that first.16:17
th1aPartly it just breaks us out of the "piles of tabs" issue.16:18
replaceafilllet's use the "contacts" example, you can have like "n" contacts in the accordion, but you need a button to go "manage" contacts for the person16:18
yvlpersonally, I don't see a piles of tabs issue ;)16:18
yvljust FYI16:18
th1aTwo levels of tabby navigation is manageable.16:19
aelkneryvl, i was hoping to see test.html rendered in the browser since we are discussing it16:19
th1areplaceafill, Yes.16:19
aelknerhow would i do that?16:19
th1aMine is at file:///home/hoffman/Desktop/flourish/src/schooltool/skin/flourish/resources/test.html16:19
replaceafillaelkner just poing your browser to file:///home/replaceafill/.sandboxes/flourish/src/schooltool/skin/flourish/resources/test.html16:19
yvlmine is file:///home/justas/src/schooltool/schooltool_flourish/src/schooltool/skin/flourish/resources/test.html ;)16:20
replaceafill:))16:20
aelkneroh, the file not a running server16:20
yvlyes :)16:20
th1aSo in your example, those content sections would be in accordions.16:20
yvlI'm thinking...16:21
yvlit is very likely16:21
yvlcan we take a 3 min break?16:21
yvlI'd like to think about this a little bit16:21
th1alol... yes.16:21
yvlIt is a very interesting idea16:21
aelkner'thinking' one puff at a time :)16:21
yvl(especially for netbooks)16:21
th1aNote that we won't be slapping accordions everywhere.16:21
yvlyes :D16:21
th1aI'll talk to replaceafill.16:22
th1aI think I want you to just do buttons first.16:22
th1aHm... the Ubuntu ones have gradient backgrounds.16:23
replaceafillit's an image i think16:23
replaceafillbecause of the "background-image: orange" rule16:23
th1aeh?16:23
replaceafillpage 2316:24
replaceafilllast paragraph16:24
replaceafilli have a related question here:16:25
replaceafilli think css3 defines styles for gradients16:25
th1asprites?16:25
replaceafillbut not all browsers support it16:25
replaceafillhttp://webdesignerwall.com/tutorials/css3-gradient-buttons16:26
th1aOne good thing about this is we can always look at ubuntu.com for clarification.16:26
replaceafillsee the .button class defined there16:26
replaceafilltrue16:26
* yvl back16:27
replaceafilltransparent url(images/topnav_divider.png) no-repeat scroll right top !important16:27
aelknerreplaceafill, hugh?16:28
yvlit's a CSS rule16:28
th1aWe may have to get used to replaceafill lapsing into talking CSS.16:28
aelkner:)16:28
th1aIt is a side effect.16:28
replaceafillsorry :D16:28
yvllooks like one from top header16:28
yvlIIRC16:29
yvlthe topmost tabbed one16:29
replaceafilli'll come back ot the css3 browser support question later16:29
th1ay16:29
th1ayvl?16:29
yvlth1a, I think the accordion thing is really worth trying out16:29
yvlat least in some places16:30
yvllike person :)16:30
th1aYes.16:30
yvlok, let's move on for now16:30
yvlso, the things we discussed so far are common for all pages16:31
yvlthis is what every SchoolTool page will have16:31
yvloh, and the footer of course16:31
yvlthen comes the second part16:32
yvlin code it is put to another template16:32
yvlpage.pt16:32
yvl(and page_extended.pt)16:32
yvlfirst, let's go over page.pt - it mimics the test.html16:32
yvlthere are 3 vertical "columns", their widths taken from the guidelines16:33
yvlin the center you have the "content template"16:33
yvlthat is the main content of your page16:33
yvllike - if you're looking at a gradebook it will take up the "Main Page Content Here" place16:34
yvlthen, there's additional content16:34
yvlit will not apply to gradebook (likely)16:34
yvlbut it is for pages like Person16:34
yvlyou can add many "additional" blocks of content16:35
yvlsay, in our person pages we have...16:35
yvlPersonInfo viewlet manager if memory serves me well16:35
yvlwe add courses there16:35
yvlwe add groups there16:35
yvland so on16:35
yvleach of those, at the moment (!)16:36
yvlhave their action buttons16:36
yvlumm, may have their action buttons16:36
yvlit looks quite nice in some places16:36
yvllike add event in calendar16:36
th1aWe pretty much don't want to think "action buttons" at all anymore.16:37
yvlI'm not sure if we're going to end up with more than few of them16:37
yvlcan you pick another name?16:37
yvlthese (in my head) are for modifying contents of the block in some way16:37
th1aI think one key distinction is between "static" and "dynamic" actions.16:37
* replaceafill wonders if those "action" buttons should be inserted into the rounded block of the content...16:38
th1areplaceafill:  yes.16:38
yvlreplaceafill - I've no idea16:38
yvlmaybe!16:38
replaceafilli mean to make clear to which block they apply16:38
th1aStatic actions are integral to the body of the page.16:38
th1aThey should *usually* just be integrated with the content.16:38
th1aIn the main body.16:39
yvlhmm, I'm not sure I understand you16:39
yvloh16:39
yvlhmm16:39
th1aThey don't need to go at the top or side.16:40
th1aWe can just design the page to be usable.16:40
th1aThey might go at the side, or perhaps even as navigation.16:40
yvlright16:40
th1aMaybe *usually* is too strong.16:40
th1aWe should always consider that they can go right in the body.16:40
yvlof course!16:41
th1aAnd go ahead and put them there as appropriate.16:41
th1aWe've just chucked things into action buttons by default, which is bad.16:41
* yvl agrees16:41
yvlmy guess is that there will be few buttons that could go at the top16:41
yvlI kind of like Launchpad's edit icon16:42
th1aRight.16:42
aelknerso when we talk about action buttons, we are thinking changing them to local context buttons, right?16:42
aelkneror buttons close to the thing being acted upon16:42
th1aBasically, hardcoded in the page.16:42
th1aThere are essentially three places they can be put.16:42
yvlyes16:42
th1aThey can be one of a small number of navigation style tabs at top.16:42
th1a2) They can be embedded in the body of the page.16:43
th1a3) They can go in the sidebar.16:43
yvlnice!16:43
th1aAnd then the "dynamic" buttons will be links in the sidebar.16:43
th1aThe ones added programatically later.16:43
yvljust a minor note, if I may16:44
th1aAlso the busy, cluttery parts.16:44
yvlI think it is acceptable for some modules to add buttons where they may16:44
yvlI am basically thinking CanDo, Cambodia and, well, gradebook16:44
yvlor calendars16:44
th1aWhere they may?16:45
yvl"if it really makes sense"16:45
yvl"if it really really makes sense"16:45
th1aWhere they may to their own views or others?16:45
yvleverywhere16:45
yvlin some cases you do need to remove stuff16:46
yvlor replace16:46
yvlbut that should be a serious exception16:46
yvlthe way I see it16:46
yvlif you need to add something, you can add as "additional content" for the page16:47
th1aI guess I'm saying that the main view should have the minimum of dependencies on other components, and if other components are adding actions, they'll fall in the side.16:47
th1aWell, perhaps we'll come up with a way to add an accordion section, too.16:47
yvlI think we are trying to say the same thing ;)16:47
th1aThat's a good trick.16:47
yvlok, so moving on to other 2 columns16:48
yvlthe left on is called "refine" at the moment16:48
yvlthough it's not as accurate as I'd like16:48
yvlsame as the center column, plugins or modules can add content boxes there16:49
yvlthe purpose is both navigation and filtering16:49
th1aSo are those viewlets?16:49
yvlsay, we're looking at a section16:49
yvlyes, th1a16:49
yvlalmost everything is :D16:49
replaceafillcontent providers ;)16:50
yvlyes16:50
aelknermaking it flexible16:50
yvltrying to :)16:50
yvlso, we're looking at a section16:50
yvlthere could be a box "terms"16:50
yvldealing with the thing that section can span multiple terms16:51
yvlumm, sorry16:51
yvlkind of lost my thought here16:51
th1aSo on one hand, every page needs a bag o' links space at left.16:51
yvlyes16:52
th1aWhere arbitrary future components can add links.16:52
aelknerexcept the gradebook, right?16:52
yvlwhy not the gradebook?16:52
th1aAnd then each object wants to be able to add additional viewlets16:52
th1aaelkner, To be decided.16:52
aelknergradebook needs horizontal space16:52
th1athat are relevant to its particular navigational issues.16:52
th1aWe'll see about the gradebook.16:53
yvlth1a, yes16:53
th1aaelkner:  Probably.16:53
yvlanother example: calendar16:53
yvlit can have, say, three boxes16:53
yvl1) type of calendar: weekly/monthly/yearly16:53
yvl2) overalyed calendars / visible calendars16:54
yvl3) quick-nav, i.e. jump to year currently, could be replaced with jump to date (input box)16:54
replaceafillyvl, is it possible to insert "non-refine" content there?16:55
yvlyes16:55
replaceafilllike a little calendar or something16:55
replaceafillah ok16:55
yvlbut!16:55
th1aPerhaps the first viewlet in that column should always be called "Links" to remind us that it is the dynamic navigation part.16:55
yvla litle calendar should go on the right16:55
aelknerexplain refine and non-refine please16:56
replaceafillyvl ah!16:56
aelkneri don't tink non-refine is a valid english concept16:56
yvlit is a name, aelkner16:56
th1aSo that's how you get to Interventions or Grades for a individual student.16:56
yvlit should probably be change to navigation16:56
yvljust... better name than navigation16:56
th1aLinks.16:57
aelknerrelated links?16:57
yvlwell16:57
yvlsay, we have resources16:57
th1aActually, here's a key distinction.16:57
yvlthat's another interesting case16:57
yvlyes, th1a ?16:57
th1aThe difference between the way a person and their contacts are handled verses the way persons and their grades are.16:58
th1aPersons and contacts are tightly bound, you don't leave your context to view them.16:58
th1aBut you follow a link to the gradebook view for the person.16:58
th1aWe don't embed more than, at most, a summary.16:58
yvla good example16:58
th1aBut I don't want to be adding "Gradebook" to the second level navigation as a tab.16:59
th1aGradebook shouldn't appear on both first and second level navigation!16:59
yvlth1a, thank you - you reminded of another example17:00
yvlsay, we're looking at a person17:00
yvlone of the boxes at the right can be titled "Gradebook"17:00
th1aActually, maybe the link bag's title should be the possessive form of the object's title.17:00
th1aAlan Elkner's...17:01
yvlwith links to all his gradebooks - math, literature, etc.17:01
th1a- grades17:01
th1aetc...17:01
yvl+117:01
yvlno, +217:01
th1atbh, let's start without a right sidebar and only add it if we really run out of space at left.17:01
yvlalso, the boxes can be very dynamioc in some cases17:02
yvlsay, we are looking at "Manage School" thing17:02
yvlon one hand, there are things global to the school17:02
yvlat the moment - all persons, all contacts, schoolyears17:02
yvlanother box could be links for 2011 - the active year17:03
yvlcourses, sections17:03
yvland some hand-picked groups17:03
yvlteachers, students17:03
th1aYes, the complex objects need more complex customized views.17:03
th1aUsing multiple columns in the body, etc.17:03
th1aI'm considering that post-sprint work.17:03
yvlsure17:04
yvlbut I was talking about the right column17:04
yvlit is not necessary only the links for the object17:04
yvlit may be reasonable links by context17:04
yvllike - active schoolyear17:04
th1aLet's just table the right sidebar for now.17:04
yvlok17:04
yvlfinally, there's the right column, I called it "detail" in the code17:05
yvlit has some useful cases17:05
yvlfor one - two small calendars look really in place for the calendar view17:05
yvlif you recall, currently they are on the left in ST17:05
yvlif they go on the right, the view becomes way cleanre to look at17:05
yvlanother useful scenario17:06
yvlif you add a term, and put a box with school year 2011 start/end dates17:06
yvlit draws attention to the eye17:06
yvlit's not necessary, but it just looked more...17:06
yvlobvious when I expermiented17:06
aelknerhelp the user learn?17:06
yvl(than putting the same line in the page)17:06
yvloh, sorry, I remember17:07
yvlit's called "related" in the code17:07
yvlyes, help the user learn :)17:07
yvlit's basically a place for non-vital related information17:07
yvlsummary of stuff17:07
th1aI'm anti-box in these sidebars, by the way.  I'd go for a look like the Ubuntu footer.17:07
yvlhmm17:08
yvlinteresting17:08
yvlfrankly, I've never considered putting such information at the bottom17:09
yvlI'm just not used to seeing anything there17:09
th1aNo... I just mean style wise.17:09
yvlas in17:09
yvlI'm used to facebook's style17:09
aelknerproblem with footers is user doesn't see it if main content is long17:10
th1aI just mean lines.17:10
th1aDesign.17:10
yvloh!17:10
yvlright :)17:10
aelknerit's one thing to put copywrite17:10
yvlthen - yes, please!17:10
aelkneror register bugs links17:10
th1aI'm just talking style, aelkner.17:10
aelkneroh sorry, ust css17:11
yvlboxes were... the first obvious choice to keep myself reminded that these are separate viewlets17:11
yvlit's a developer thing ;)17:11
th1aSure.17:11
yvlthis is the type of thing the design company will probably adress17:12
yvladdress17:12
th1aIncidentally, I was just thinking about making the footer a one line static footer locked to the bottom of the window.17:12
aelknerooh17:12
th1aWell... to a degree, but we should start with the Ubuntu consistent way.17:12
aelkneran acordian?17:12
yvlhmm, if I understood you correctly, then -117:13
th1aNo...17:13
yvlyou meant always visible, right?17:13
th1aThis is just a brainstorm.17:13
th1aYes.17:13
replaceafillif we think netbookwise, -117:13
aelkneryes, th1a meant that, but i thought it could open up with more info17:13
th1aYou could hide it.17:13
aelknerif the user clicked it17:14
yvl+1 for such thing in devmode, -1 for user mode17:14
aelkneror hide it, too17:14
th1aI'm just thinking that sometimes it is way too prominent because we have very short forms.17:14
yvloh!17:14
aelkneryes, good point17:14
yvlI am sorry about that17:14
yvlI don't know a way to get around this17:15
yvla clean way, that is17:15
th1aAnyhow, that's just a brainstorm.17:15
th1aLet's move on for now.17:15
yvlbut it was a good point, th1a17:15
aelknerdoesn't css allow locking divs relative to browser position?17:15
yvlwith the short forms17:15
yvlas far as I'm aware - 90% of the worlds web developers are annoyed at this :)17:16
yvl"if the content is too short vertically, just fill the page!"17:16
yvlright17:16
yvlmaybe in CSS4 ;)17:16
th1aOK, moving on.17:17
yvlyes17:17
yvlwell, so that's that with the layout17:17
th1ayvl:  What do you think you should do next?17:17
yvltake a small break :D17:17
yvlmore seriously though17:17
yvlone of the things is to chat about the code changes17:18
yvlthen17:18
th1aOh, right.17:18
yvlhmm17:18
yvlyou know, let's take a break17:18
yvlsome code speak will be probably next17:18
th1aOK.17:18
th1a10 minute break.17:19
yvlok17:19
replaceafillth1a this is what i meant before about gradients in ubuntu.com, for example: http://www.ubuntu.com/download/ubuntu/download uses:17:24
replaceafillhttp://www.ubuntu.com/sites/default/themes/ubuntu10/images/btn-download-bg.png17:24
replaceafillhttp://www.ubuntu.com/sites/default/themes/ubuntu10/images/btn-download-hover-bg.png17:24
replaceafillhttp://www.ubuntu.com/sites/default/themes/ubuntu10/images/btn-download-active-bg.png17:24
replaceafillfor the Download button17:25
replaceafillsorry, "Start download" button17:25
th1aAre those gradients?17:25
replaceafilljust background images17:26
replaceafillwith gradient effect17:26
th1aOK.  Good.17:26
th1aOK, that's ten minutes.17:28
th1aBreaks are stricter when they're timestamped.17:28
replaceafill:D17:28
yvl:)17:30
yvltrue17:30
yvlok17:30
yvlso, some codespeek17:30
th1aYes.17:30
yvlthere are few concepts that will be "heavily" used from now on17:30
yvlcontent providers, viewlets/managers and zc.resourcelibrary :)17:30
yvlfirst, the easiest part, the resources17:31
yvlif you looked at skin/flourish/configure.zcml ,17:31
yvlthere is a resourceLibrary directive for static resources17:31
yvlall libraries have their unique names17:32
yvldependencies17:32
yvland files they include17:32
yvlone module can have multiple libraries17:32
yvlnow, the good part17:32
yvl<tal:block replace="resource_library:schooltool.skin.flourish" />17:33
yvland the library is17:33
yvl  <zope:resourceLibrary17:34
yvl      name="schooltool.skin.flourish"17:34
yvl      require="" >17:34
yvl    <directory17:34
yvl      source="resources"17:34
yvl      include="flourish.css17:34
yvl  </zope:resourceLibrary>17:34
yvlthis way you should write css and javascript your pages need17:34
yvlsay, calendar needs it's own grid and event css17:34
yvlalso, some js17:35
yvlthere should be a respective library for that17:35
yvland all views should have the resource_library: directives17:35
yvlit tells the internal machinery that template is dependent on the library, and library includes are render *after* the page is rendered17:36
yvlso if you want to add some box with a little calendar to a person view17:36
yvlyou can do it by rendering the viewlet17:36
yvland since it's template knows the css library it needs17:36
yvlthe library will be added17:37
replaceafillquestion here:17:37
yvlthe require pare of the zcml directive describes libraries that *must* be rendered before17:37
replaceafillah!17:37
replaceafillthat was my question :D17:37
yvlso that solves the ordering17:38
replaceafillok, new question17:38
replaceafillin cases where the .js file depends on information of the view class,17:38
replaceafillshould we still use "html_head" to insert those17:38
replaceafillor does this "require" functionality could handle that?/17:39
yvlI would prefer not to use html_head17:39
yvlthere are few ways to do this17:39
* replaceafill is ashame of his english... "does... could"17:39
yvl:D17:39
replaceafilli mean, the gradebook's js depends a lot on the view class17:39
yvlfirst, it is ok to render some script in the view itself17:40
yvlsecond, the tal directive is derived from tal's string: directive17:40
yvlso you can <tal:block replace="resource_library:${view/stuff}" />17:40
yvland you can pick respective library17:41
yvlthose two should cover most of the cases17:41
yvlas for the language-dependent JS...17:41
yvlfrankly, I haven't decided on that one17:41
th1aAre you following this, aelkner?17:42
aelkneri'm struggling to catch up17:42
aelknerbut i get the idea of js and css being linked to the view17:42
aelknerthis last part about the tal:block?17:43
yvlok17:43
yvllet me grep for an example17:44
aelkneri was going to say that examples are the way for me to grok it17:44
aelknerfor instance, above flourish.css sonds like a global thing, so i'm confused by that17:44
yvlah, ok17:45
aelknertwo examples starts a trend :)17:45
yvlsay, you defined a library in ZCML17:46
yvland named it "schooltool.skin.flourish"17:46
yvlit becomes a global thing17:46
yvlnow in any template you can say that you need these resources so that it would be displayed correctly in the browser17:46
yvlthe last part is for very rare cases17:47
yvlsay, you do not know the name of the library in advance17:47
yvland want to calculate it17:47
yvlschooltool.calendar-weekly, schooltool.calendar-daily17:47
yvlthis is a very rare case!17:48
yvlif you looked at table/templates/batch.pt17:48
yvland searched for string:17:48
yvlyou can find:17:48
yvl<a tal:attributes="href string:${view/base_url}?batch_size${view/name}=10"17:48
yvlhere,17:49
yvlhref is calculated as a string17:49
yvl${} parts are inserted into the whole string17:49
yvlyou can do the same with library names17:49
yvl<tal:block replace="resource_library:datewidget_${view/language}" />17:50
yvlbut the usual scenario is simpler17:50
yvlnot all of the gradebook views need the "grid" css17:50
yvlhence that css should be included in some of the views17:51
yvlyou need to define "schooltool.gradebook-tabbed-grid" library in zcml17:51
yvland include only necessary CSS files17:51
aelkneri follow that17:51
yvland then, in the views, you add the resource_library: thing17:51
yvlcool17:51
yvlso that is it actually17:52
yvloh17:52
aelknerso you covered the 'first, the easiest part' from above17:52
yvlyou can also specify the needed library in python17:52
yvlzc.resourcelibrary.need('schooltool.gradebook-tabbed-grid')17:52
yvlsay, in update or render method17:52
aelknerhow about at lcass level?17:53
aelknerclass17:53
aelknerlike fields or something17:53
yvlno, it needs to be in a method17:53
* replaceafill haven't really understood the "need()" call17:53
replaceafillwhat does it do?17:53
aelkneri mean, we say template= or fields= at class level as it is17:53
yvlit's a same as resource_library: directive17:53
yvlgood point, aelkner17:54
replaceafillyvl get's you the appropriate "url" for it?17:54
yvlyes I do? ;)17:54
yvlI mean yes, it does17:54
yvlzcml registers the resources17:54
yvlthe name of the library is just a shorthand17:55
yvlbut it is unique to your application17:55
yvlhence it's good to use long names, like "schooltool.gradebook-gradebook-tabs"17:55
yvlcurrently I'd prefer all dependencies to be declared in .pt files17:56
yvlthey themselves need the CSS after all17:56
*** alga has quit IRC17:56
aelkneryeah, good point17:56
yvlok, so let's move on?17:57
aelknerthe less needless switching back and forth from pt to py the better17:57
yvl+1 ;)17:57
yvlso, next are the content providers17:57
yvlyou may have seen some of the code already17:58
yvlbasically, it is a named adapter on context, request and view17:58
replaceafilli have a Lazy question :)17:58
yvlgo ahead17:59
replaceafillonce you told me we shouldn't use Lazy because it behaves strange in the debugger17:59
replaceafillremember?17:59
yvlyes17:59
replaceafillcan you describe what it does?17:59
aelknerwhy do you ask?17:59
aelknerwhat code are you looking at?17:59
yvlbecause I had a change of heart and started using it again18:00
yvlflourish/page.py18:00
replaceafillyvl :D18:00
menesis:)18:00
yvlwell it is somewhat annoying when debugging18:00
replaceafillso, it's like a property that's calculated only once?18:00
yvlyes18:01
replaceafillah18:01
yvlalso it is annoying for tests, because I always forget that once it's calculated it's calculated18:01
yvland if you change some view attributes in test, it does not re-calculate by magic18:01
yvleasy to forget and make mistakes18:02
yvlI used it to reduce adapter lookups18:02
replaceafillright, and we usally don't register stuff on runtime, right?18:02
yvlI reckon we don't define new adapters that often18:02
yvleven in tests18:02
aelknercould one say that it's appropriate when used sparingly and with high payoff?18:03
yvlone surely could18:03
replaceafillyvl another thing i didnt get right:18:03
replaceafill# Arbitrary keys and values are allowed to be passed to the manager.18:03
replaceafillIManagerDirective.setTaggedValue('keyword_arguments', True)18:03
yvlah, magic :D18:03
replaceafillwhat does that setTaggedValue do?18:03
replaceafill:)18:03
yvlthis is a neat trick18:03
yvlthis means that the directive now accepts any random values18:04
yvl<flourish:viewlet18:04
yvl   ....18:04
yvl   foobar="Hello!"18:04
replaceafillah!18:04
yvl  />18:04
yvland current implementation sets foobar = u"Hello!" to your class18:04
yvlvery usefull for viewlets18:05
yvlagain - a good payoff18:05
replaceafilldefinitely18:05
yvlso, content providers18:05
yvlcurrent implementation is a bit messy18:05
yvlbut in its essence it allows things like:18:05
yvl  <content18:06
yvl      class=".app.ContentTitle"18:06
yvl      permission="schooltool.view"18:06
yvl(as seen in schooltool/app/browser/app.py)18:06
yvland then in page templates:18:06
yvl<h1 tal:content="structure context/schooltool:content/title"> </h1>18:07
yvlschooltool:content looks up the content provider named title18:07
yvlsince the content provider is registered for context, request, view18:08
aelknermay i ask something real quick?18:08
yvlsure!18:08
aelknerthe branch we're looking at is trunk plus skin/flourish?18:09
aelknerand nothing else, right?18:09
yvl+ some views in schooltool/app/browser/app.py18:09
yvland some new templates named f_*.pt18:09
aelknerok18:09
yvlhmm18:09
yvlmaybe there's something else18:10
yvlI don't remember what was merged to trunk, sorry18:10
aelkneri'm lloking at app.py, but i don't see what you're referring to18:10
yvlin trunk?18:11
replaceafillaelkner schooltool.app.browser.app.ContentTitle18:11
aelkneroops18:11
aelkneri was looking at app/app.py not ht ebrowser file :)18:12
yvl:)18:12
yvlso, content providers give us some fine-tuning points18:12
yvlsay, we want to change a title of person container in some views18:13
yvl    <content18:13
yvl        class="schooltool.app.browser.app.ContentTitle"18:13
yvl        permission="schooltool.view"18:13
yvlI could have changed the title for a view, if view="..." was set18:13
yvlhere it was changed for a container in all views18:14
yvlso if you wrote something like this in tal:18:14
yvl<h1 tal:content="view/schooltool_app/persons/schooltool:content/title"></h1>18:14
yvlyou would get "Persons"18:14
yvlreplaceafill - note the "title" attribute - it's not a part of directive, it's done via tagged keywords and replaces a *property* in base class18:15
yvlhacky!18:15
replaceafill:)18:15
yvlthe directive in this example is cumbersome, but I plan to write ZCML shorthands as we have more similar directives18:16
yvlit's a bit difficult to plan ahead18:16
yvlok, so that's it on content providers, unless you have questions18:17
yvl(other than "why the hell you would need them?")18:18
aelknerthis last part is magic18:18
yvlyes18:18
aelkneri'd say ok to magic if demystified by examples/docs18:18
yvlapologies, I did intend to write those!18:18
yvlwell, I still do :)18:19
aelknersee, when everything is just concepts, i get lost easily18:19
yvlI don't blame you!18:19
aelkneri'm a pattern recognizer if there is a label to be put on me18:19
replaceafillthe answer is in the code :)18:19
replaceafillbut also, i dont blame you18:20
th1aWell, aelkner won't need to do this stuff immediately anyhow.18:20
th1aI don't think...18:20
yvltrue18:20
th1aLet's talk about the rest of the day and tomorrow.18:20
yvlok18:20
yvljust one thing18:21
yvlI'd like to briefly go over some places page.pt18:21
replaceafillthe only concept i dont have clear right now is the "active viewlet"18:21
yvlwhen you display a list of tabs, you need to highlight one of them18:21
aelknerdid we discuss that yet?18:21
yvlno18:21
yvlname sucks, but it is again a simple adapter18:22
yvlviewlet managers have a list of viewlets18:23
aelknerreplaceafill, where are you getting this from?18:23
yvlall viewlets have names18:23
replaceafillaelkner skin/flourish/instance/app.zcml18:23
yvlIActiveViewletName returns the name of the viewlet that is "selected"18:23
yvlalso, there is a trick replaceafill :)18:24
yvlif you define a viewlet manager18:25
yvland define an identical one on one of the views, with a slight difference18:25
yvlactive_viewlet="manage"18:25
yvlit will override the machinery and set the active viewlet18:25
yvlas a class attribute18:25
yvlnot saying you should use this, but just FYI18:25
replaceafill:)18:26
yvloh, and active_viewlet is used in ListNavigationBase18:26
yvlallright then, I think th1a intends to round this up18:27
yvlso we can postpone the viewlet manager talk for later18:27
yvland go over immediat plans18:27
yvlimmediate :)18:27
yvl("right after these commercials!")18:27
* yvl runs off for 3 minutes18:28
* th1a wakes up.18:28
th1aThree minutes...18:31
* th1a is glad real meetings don't have timestamped breaks.18:32
yvl:)18:33
th1aOK.18:33
th1aSo, perhaps yvl would like to iterate on test.html tomorrow?18:33
yvlhmm18:34
th1aOr...18:34
th1aI can come back to you.18:34
yvlmenesis raised a good point18:34
yvlI got to the part on "how the page is assembled"18:34
yvli.e.: how to write a view18:34
yvlso I'll need to talk about this18:35
yvlor... write an email18:35
replaceafillexplain <flourish:page ...> too18:35
yvlthat's the part :)18:35
replaceafillcontent_template=...18:35
replaceafill:)18:35
replaceafilland dont forget i18n:domain in content templates :P18:35
yvlI explicitly ignored them18:36
replaceafilli noticed :P18:36
yvlthank you! :)18:36
yvlok18:36
replaceafilland then you made me think "maybe ther'es a magic way for the extractor to pick them up"....18:36
yvlno there's not18:36
yvlso let me sum that up in email tomorrow18:36
aelknerbtw, is this term, 'flourish' going to end up in the permanent namespace?18:37
* yvl shrugs18:37
yvlthis seemed like a better name than "newskin"18:37
th1aI like it.18:37
th1aYes!18:37
yvland I kind of liked the full definition of the word18:37
th1aActually, if we ever somehow lose our trademark cold war, I think "flourish" would be a good name for the application.18:38
yvl:D18:38
yvlthanks, th1a :)18:38
replaceafillcold war :))18:38
th1aSo... let's talk about aelkner and replaceafill.18:39
yvlso, is anyone up for another meeting tomorrow?18:39
th1aWe'll need one.18:39
th1aRegular time.18:39
th1a1 hour.18:39
yvlagreed18:39
aelkneri thought we were meeting all week18:39
th1aPretty much.18:39
aelknerit's a sprint, isn't it?18:39
th1aYes.18:40
th1aI've been running in place the whole time.18:40
* yvl is also ok with regular time - 1h, duration 1h :)18:40
th1aYes, keep it to an hour.18:40
yvlok, so replaceafill18:40
yvlthere is an important thing that needs to be done18:41
yvlform css :)18:41
yvlare you up for it?18:41
th1aWell, perhaps not immediately.18:41
yvlok18:41
th1aI think I need replaceafill and aelkner to get aelkner up to speed on making jquery dialogs.18:42
th1aSo I can keep aelkner grinding away.18:42
yvlthere is one thing that would be a big help for me18:42
yvlsince you guys are in the same timezone18:42
aelkneralso, we need to discuss branch coordination18:43
yvlright!18:43
aelkneris yvl's flourish branch the sprint trunk?18:43
yvlno, I will make one18:43
yvland send and email ;)18:43
aelkneruser schooltool-developers, right?18:43
aelknerthen we can bzr pull before bzr push, etc.18:44
yvlyes18:44
yvlthen again18:44
aelknerthat's what filip and i did at our sprint18:44
yvlwe could have one central branch18:44
aelknerthat's what i meant18:44
yvlyou and replaceafill  could have your own branches18:44
yvlevery morning I would merg your branches (and mine) to the central18:45
aelknersorry, go on18:45
yvlevery morning you would merge the central to yours18:45
aelknerand we would merge back from central?18:45
aelkneroops, hit enter before reading18:45
yvland every morning th1a would pull from the central18:45
th1aYes, that's what I want.18:45
aelknersounds like a good plan18:46
aelknerclean18:46
yvlmenesis, do you think that bzr is up for the task?18:46
yvl:)18:46
aelknerreplaceafill and i could even merge from one-another's branches18:46
aelkneron occasion, when we want to share something new18:46
menesisyvl: that's what bzr was made for!18:46
yvlthat settles it then :)))18:47
yvland aelkner - yes, please do18:47
replaceafillyvl is the branches talk the thing that would be a big help for you?18:47
aelkneranyway, we don't have the central branch ntil tomorrow18:47
yvlwell, yes, but I had something else in mind18:47
aelknerwhat tasks can we have until then?18:48
aelkneri can read your code and grok it18:48
th1amaking some modals.18:48
aelknerthe part about the content providers and directives is all magic to me18:48
yvlreplaceafill, can you help aelkner "real time" with undocumented zcml/zope hackery?18:48
aelknerah yes, replaceafill can clue me in on dialogs as th1a suggested18:48
replaceafilli can try ;)18:48
* yvl would be very grateful :)18:49
replaceafillof course18:49
yvlallright then18:50
yvlmodal dialogs...18:50
yvlfew things of interest18:50
th1aThe one problem with this plan is that the links that trigger the modal dialogs will be changing.18:50
th1aI assume that's a minor issue.18:50
yvlhopefully18:50
yvlreplaceafill, see flourish/templates/z3c_form.pt18:51
replaceafillyes18:51
yvlthis is the content template for a person add18:51
replaceafilli was going to bring that up on the <page> directive cnoversation :)18:51
yvlI'm thinking about making Page's traversable18:51
replaceafillyvl should something like that be the template for all forms?18:51
replaceafillshouldn't...18:51
yvlwell it currently uses a macro18:52
yvlI intend to put the content of the macro there18:52
yvlso, if all pages have their /modal18:52
yvland, say, render content_template instead of template... :)18:53
yvlcould you put that into modal dialog? ;)18:53
yvland make some links do url to the page + "/modal"18:53
yvland such links could have onclick18:53
yvland instead of flourish.page.LinkViewlet there could be JSModalLinkViewlet....18:54
replaceafillyvl you mean the traversal view idea you mentioned before?18:54
yvlyes18:54
replaceafill:|18:54
replaceafillso we would have "persons/add.html/modal18:55
yvlyes18:55
replaceafillcourses/addSchoolToolCourse.html/modal18:55
replaceafilland so on18:55
yvlautomation :D18:55
yvlthen again, I've not settled on the issue yet18:55
yvlmaybe simply registering page that instead of template renders content_template may be better18:56
yvlyou could start with that18:56
th1aA page might have multiple modals.18:56
yvlth1a, it should be fine18:57
yvlpersons/index.html will have multiple modals18:57
yvlpersons/addTeacher.html will be add teacher *page*18:57
yvlpersons/addTeacher.html/modal will be the modal version of the form18:57
th1aOK.18:58
yvlagain - haven't finally decided18:58
th1aSo... what do you think replaceafill?18:58
th1aI don't want to hold up on this process.18:58
replaceafillyvl so, for registering those i should use: <page content_template="TEMPLATE WITH ONLY REQUIRED Z3C FORM MACROS">18:59
yvlfor starters, you could do this:18:59
yvlinstead of specifying content_template18:59
yvlspecify template directly18:59
yvlthat's it18:59
replaceafillah, ok18:59
yvl    <flourish:page19:00
yvl        for="schooltool.app.interfaces.ISchoolToolApplication"19:00
yvl        name="login.html"19:00
yvl        />19:00
yvl    <flourish:page19:00
yvl        for="schooltool.app.interfaces.ISchoolToolApplication"19:00
yvl        name="login-modal.html"19:00
yvl        title="Log in"19:00
yvl        template="templates/f_login.pt"19:00
yvl        class="schooltool.app.browser.app.LoginView"19:00
yvl        permission="zope.Public"19:00
yvl        />19:00
yvlinsta-win! ;)19:00
replaceafill:D19:00
yvlso... are we there yet? ;)19:01
aelknerperhaps a silly question19:01
aelknerthe whole flourish sub-package of skin is intended as an addition19:01
aelknerthat works wide-by-side with the main skin19:01
aelknerand is registered as a separate skin?19:02
yvlyes19:02
aelknerand the flourish namespace is for this skin only19:02
yvlyes19:02
replaceafillyvl it's basically what i did here, correct? http://bazaar.launchpad.net/~replaceafill/schooltool/schooltool_jquery-ui/revision/280019:02
replaceafillname="addSchoolToolCourseInline.html"19:02
replaceafillwell, not exactly the same...19:03
replaceafillbut same idea19:03
yvlsame idea19:03
replaceafillgot it19:03
yvla small note - I'll move some of the zcml from flrourish subpackage to respective folders19:03
aelknerlike what?19:04
yvlapp.zcml to schooltool/browser/app/flourish.zcml19:04
aelknerah19:04
yvlfrom schooltool/skin/frlourish/instance19:04
yvlbut the idea stays the same19:04
yvlflourish is a separate skin19:04
yvlalso - a separate instance - at the moment19:05
yvlwill be default instance this autumn19:05
aelknerthat's the switch-over19:05
aelknerseems like a clean plan19:06
yvllet's do this ;)19:06
replaceafillquestion:19:06
replaceafillfor this modal task19:06
replaceafilli think we should move old <addform> <editform> directives to z3c.forms19:06
yvl+719:07
replaceafillor are we going to post pone this19:07
replaceafill:)19:07
th1aI think now is the time.19:07
aelkner+119:07
yvlsome formlib views can stay though19:07
yvlbut if you can move them - move them19:08
replaceafilldoes formlib provide macros?19:08
replaceafilllike z3c.form dos19:08
replaceafilldoes19:08
yvlwe have macros for both formlib and z3c.form19:08
replaceafillah ok19:08
yvlsee schooltool/skin/configure.zcml19:09
yvlz3cform include19:09
yvland, well, "formlib_macros" :D19:09
yvland the rest of the mess19:09
yvlso19:10
yvlwhere's that bag of gravel? ;)19:10
aelknernot ready yet19:10
yvlaww19:11
aelkneri was promised a branch discussion19:11
aelkneri have two branches, one for the menu (not as important) and one for iding report sheets19:11
aelknerhiding19:11
th1aThe day is not over aelkner.19:11
aelknerthat one is needed by a customer19:11
th1aHere's what I keep trying to get to.19:11
th1aaelkner:  Chill.19:12
th1aSo I have some places to put modal dialogs in related to persons in the spreadsheet.19:12
th1aCan we have aelkner and replaceafill try to tackle one or more of those today.19:12
th1a?19:12
*** menesis has quit IRC19:12
th1aSay, password_edit.html?19:13
yvlperson_add?19:13
th1a@@groups.html if you're ambitious.19:13
yvlwell, here's the status of the views19:13
th1ayvl:  Actually, I don't think we gain anything with such a complex form.19:13
yvltrue19:13
yvltrue19:14
yvlhmm19:14
yvlit would be best to have a person view19:14
yvlthat we could look at19:14
yvlbefore toying with edit view19:14
th1aThere is plenty of work to do around the edges.19:15
yvlreplaceafill, if you're up for it, you can port the index.html of basic person19:15
yvlwell, here's the thing -19:15
th1aIn fact, the edges are the site of some of the biggest atrocities.19:15
yvlhmm19:15
th1aI need to get aelkner working on these or he'll be twiddling his thumbs.19:15
yvlyou know, I think guys can try out the change password view19:16
yvlor any other edit view19:16
yvlbut branched from trunk19:16
th1aThat's what I was thinking.19:16
yvlthen quickly re-do it on sprint branch19:16
replaceafilli also think aelkner and i can use trunk for now19:16
th1ay19:16
yvlgo ahead then19:16
th1aDo you guys need anything else from yvl that you can think of before he goes and has a beer?19:17
* replaceafill looks his email19:17
replaceafill"Though I'm a bit concerned with the amount of customization done in the "inline" course view class."19:17
replaceafillyvl just that comment19:17
replaceafillthe way i implemented inline views required lots of jquery19:18
replaceafillto submit the form and insert validation results19:18
replaceafillbut i couldnt figure a better way19:18
replaceafillbtw, https://lists.launchpad.net/schooltool-developers/msg00402.html19:19
replaceafillthat's one of yvl's comment to my jquery ui branch19:19
th1aIs this a case of premature optimization?19:20
replaceafilli'd like to think it is19:20
replaceafillso i should let yvl go19:20
replaceafilland we can discuss it during the week19:20
* th1a drops the bag of gravel.19:20
yvlI think that's the case, replaceafill19:20
th1aSee everyone tomorrow, regular time.19:20
yvlwe can make the "shared" case after 2-3 views are customized19:21
replaceafillgreat, thanks19:21
yvlwell, good luck guys!19:21
yvl(almost 4 hour meeting.. wow ;) )19:21
th1aI'll let replaceafill and aelkner decide if they want a break.19:22
yvlsee you all tomorrow19:22
replaceafillthanks yvl19:22
replaceafillaelkner when it's a good time for us to start?19:22
aelknercya yvl19:22
th1athanks yvl.19:22
replaceafilli'd like th1a to be around if possible19:22
aelknerthen i'll leave it up to him19:23
replaceafillto keep us focused :P19:23
replaceafilland by us i mean me :)19:23
replaceafillok, let's only decide what view do we make modal19:23
aelknerwell, you and i need to discuss what we are doing off of trunk19:24
replaceafillaelkner ?19:24
aelknerwe will have nothing from the flourish namspace19:24
replaceafillaelkner i think flourish is not necessary yet19:24
aelknerwell, for starters, what are we trying to do first?19:24
aelkneri mean, by making modal, what changes are needed in trunk?19:25
aelknerfor picking the niew, i think edit_password is best19:25
th1aThe whole point is that it is something aelkner can do while flourish is being fleshed out.19:25
* replaceafill goes see edit password19:26
aelknerreplaceafill, if we are to make a modal dialog version of an existing view19:26
aelknerare we not in need of the /modal traversal concept?19:27
aelkneror are we talking about changing edit_password to be modal in place?19:27
replaceafillwhat i dont like about edit password is that is not z3c.form19:27
replaceafillit's zope.formlib19:27
aelkneroh, forget that then19:27
aelknerperson add?19:27
replaceafillno, too complex and i think th1a just said unnecessary19:28
aelkneris group add z3c?19:28
replaceafillsomething on person19:28
aelknercontact add19:28
replaceafillaelkner edit password doesnt seem too difficult to port19:29
replaceafilli'd almost say we only need to change the base class :D19:29
th1aLook at the spreadsheet.19:30
aelknertrue, if ever there was an easy port, that would be it19:30
th1aYou could probably just re-implement it as a pure jquery dialog.19:30
th1aAlso /preferences19:31
replaceafillaelkner let's start with edit password19:31
replaceafillor password_edit.html19:31
aelkneri was just going to say19:32
replaceafilli hope that widget works quickly in z3c.form19:32
aelknerso i'm going to make a sandbox and branch trunk19:32
replaceafillgo ahead19:32
replaceafillcan we call them "flourish_sprint" or something?19:33
replaceafilli'll do the same19:33
aelknerdepends19:33
aelknerwhat is the time frame for how long we will not be working on branches of yvl's flourish branch19:34
aelkneri was thinking 'modal_test'19:34
aelknerbecause this is just a test until the real thing, isn't that right?19:34
replaceafillok19:35
replaceafilli was just thinking we could use the same branch and merge flourish when it's done19:35
replaceafillwe can do whatever we want with our branches ;)19:36
aelkneri prefer to keep the names clear enough for what i did and when19:36
replaceafill...19:36
replaceafillok...19:36
aelkneri get confused easily renaming branches for different purposes19:36
replaceafillok19:37
replaceafillso, i'm going to port that view to z3c.form right now19:37
replaceafillif i can :)19:38
replaceafilland we start from there, ok?19:38
aelknerwell, what would i do in the meantime?19:38
replaceafillread jquery ui docs19:38
replaceafillhttp://jqueryui.com/demos/dialog/19:39
aelknerok, will do19:39
replaceafillmostly, the option of the dialog19:39
replaceafillhttp://jqueryui.com/demos/dialog/#options19:39
replaceafillaelkner you could also check out my jquery ui branch, it has an example for adding courses using modal dialogs19:41
replaceafillhttps://code.launchpad.net/~replaceafill/schooltool/schooltool_jquery-ui19:41
replaceafillspecifically see revision 280019:41
aelknerok19:43
replaceafillth1a shouldn't we ask for current password on password edit?19:56
replaceafillin case i leave my session open and unattended ;)19:56
th1aActually, yes.19:56
replaceafillgood time to do that?19:56
replaceafilldont think it's too difficult19:56
th1aWell... hopefully there's no hidden trap that explains why it wasn't done the first time.19:58
replaceafillanother thing related to edit password, if you change your own password, you'll be automatically logged out20:02
replaceafilli change my password, hit Apply, get success message, but next time i click something i get the "not allowed message"20:02
replaceafilli guess we need to change the success message to say that20:03
th1aOh... does that make it a bad candidate for modalness?20:03
replaceafill"you need to provide your new credentials"20:03
replaceafillth1a probably :(20:03
th1aYou're not going back to where you came from.20:03
th1apreferences then?20:04
aelkneryes, app preferences20:04
replaceafillwell, at least porting was easy :)20:04
th1aThere are person preferences too, right?20:05
aelknernope, thought there are gradebook preferences, but that's not core20:06
replaceafillth1a yes, there are person preferences for setting "show periods" and "make calendar public"20:07
replaceafillregular BrowserView + template20:07
th1aYeah, they're really more like calendar settings.20:08
th1aWe'll probably move the link there, and then someday do a grand reorganization of personal settings.20:08
th1aBut anyhow, you could do that one as modal.20:08
replaceafillall right, starting to port...20:08
th1aI think one of the more complex forms that would benefit is the ones in the style of @@groups.html.20:09
replaceafillok, done porting preferences form to z3c.form20:32
replaceafilllet's see how many tests were broken20:33
replaceafillth1a zyt?20:41
replaceafilli'm not sure about a behaviour20:41
replaceafillcan you visit: http://69.164.203.135:7081/persons/camila20:41
replaceafilllog in as manager20:42
aelkneri'm going to take a break for about an hour20:42
aelknerafk20:43
th1aI'm here.20:49
replaceafillah, it's just that the edit form for preferences doesnt give you confirmation message on apply20:50
replaceafillso, if you go to that form and hit apply, things are saved, but nothing is shown to the user20:50
th1aSee... the kind of gaffe we just avoid with modal dialogs!20:50
replaceafill:D20:50
replaceafillanyway, it's just that my z3c.form implementation break tests because of this20:50
replaceafillbut i think we can continue anyway20:51
replaceafillfor aelkner to start on jquery20:51
th1aWe'll be spending more time on tests that anything else.20:51
th1aWell, in an hour.20:51
th1aIf you want take a look at @@groups.html20:51
replaceafillah ok, i'll will20:52
replaceafillth1a just a comment20:52
replaceafillaelkner i pushed my changes20:55
replaceafillaelkner https://code.launchpad.net/~replaceafill/schooltool/modal_test20:55
replaceafillaelkner we'll start from there20:56
replaceafillaelkner see you in an hour20:56
*** replaceafill has quit IRC20:56
*** alga has joined #schooltool20:58
*** menesis has joined #schooltool21:57
*** replaceafill has joined #schooltool22:41
th1aaelkner:  ayt?22:45
* th1a was waiting for aelkner to rejoin the channel.22:45
aelkneri'm here22:49
aelknerreplaceafill, so i groked your jquery-ui branch and your z3c person views22:50
aelknerwhat shall we do next22:50
aelkneroh, i do have a question about jquery-ui22:51
replaceafillaelkner yes?22:51
aelknerthe $ operator in jquery is for the standard jquery object22:51
aelknerso how does .dialog() get into it22:51
replaceafillaelkner though a plug in22:51
aelkneris that what jquery-ui does in some startup code?22:51
replaceafillthat's what jquery *UI* does22:52
replaceafillyes22:52
aelkneryou could have coded the ready function without class attributes in theory22:53
aelknerusing the @absolute_url adapter and string:22:53
aelknerbut that's not important22:53
aelkneranyway, what next?22:54
replaceafillaelkner what do you mean without class attributes?22:55
replaceafillaelkner btw, i'm on a really slow network :(22:55
aelkner<metal:block tal:replace="view/addform_id" />22:56
aelknersorry, i meant22:56
aelkner<metal:block tal:replace="view/addform_inline_url" />22:56
aelknerthat could be done without adding to the view class22:56
replaceafillyou need it in the class so the form has it22:57
replaceafillsorry, not the form, the placeholder for the dialog22:58
replaceafillin the .pt file:22:58
aelkner<metal:block tal:replace="string:${context/@@absolute_url}/addSchoolToolCourseInline.html" />22:58
aelknerwouldn't that work as well and not necessitate the class attribute?22:59
replaceafillok, check course/templates/course_container.pt23:00
replaceafillat the bottom:23:00
aelknerthat's where i got that from23:00
aelknerthe load call23:01
replaceafill  <div id="addform" tal:condition="view/canModify">23:01
replaceafill  </div>23:01
replaceafillno, the bottom of the template23:01
aelknerthe addform div23:01
replaceafillnot the javascript code23:01
replaceafillyes23:01
*** hoffman has joined #schooltool23:01
replaceafilldo you have firebug installed?23:01
aelkneryes23:01
replaceafilllook at the html output in firebug23:02
replaceafillthere's an block below the footer23:02
replaceafilldo you see it?23:02
replaceafillit has "display: none;"23:02
replaceafillso it's not visible23:02
replaceafillbut you can see it in firebug23:03
aelkneryeah, i see it23:03
replaceafillok, in the template you need a "placeholder" for the dialog23:04
aelknerright23:04
replaceafillthe class attribute and the id attribute in the template should match23:04
replaceafillthey don't23:04
replaceafillthe attribute in the template is hardcoded23:04
replaceafillanyway, the point of doing all that was to get as dynamic as possible :/23:05
aelkneryou're thinking of this as a general solution, so you want the attributes to be resolved in the view class23:05
replaceafillbut again, to the basics23:05
replaceafillcorrect23:05
replaceafillsame goes with course.CourseInlineAddView23:06
replaceafillit has an id23:06
replaceafill    id = 'course-add-form'23:06
replaceafillthat can be used in jquery23:07
replaceafillbecause the form renders with23:07
replaceafill<form id="course-add-form" ...>23:07
replaceafillas i told you in my email about the popup, if you only have one element in the tree, you can assign an id to refer to it from jquery23:08
replaceafillif you will have several elements, then you append "class=" attribute to them23:08
aelkneryeah, we never discussed that change you made to my js23:09
replaceafillwe can if you want23:09
aelknersince only one menu at a time was going to be active23:09
aelknerwhy is it different giving it a class from giving it an id23:09
replaceafillthink of it like this:23:10
replaceafillafter the template has been rendered, you should have unique ids23:10
replaceafilland the id should stay the same for elements23:10
replaceafillclasses can be dynamic23:10
replaceafilli mean, you can do whatever you want with attributes, but that's what you usually do23:11
replaceafillyou don't move the id from one element to another23:11
aelkneris that something you read in a standards doc or something?23:11
replaceafillif you want to refer to a specific element you use its id23:11
replaceafillthe html spec :)23:11
aelknerwell, i was referring to a specific element, but which element that was is dynamic23:12
replaceafillhttp://www.w3.org/TR/html40/struct/global.html#h-7.5.223:12
aelknerthat link supports what i did, not the opposite23:13
aelknerthere is onl one menu that is active at a time23:13
aelknerso the words 'specific element' applies to that23:13
replaceafill:/23:13
aelknerclasses are assigned to types of elements that could be more than one in instance23:13
aelknerwhich is also exactly not the case23:14
replaceafillcorrect, or removed23:14
aelknerthere is only one active menu23:14
replaceafillcorrect, and then you REMOVE it23:14
aelkner'Any number of elements may be assigned the same class name'23:14
aelknerbut we are talking about only one element23:14
replaceafillyes, but focus on the remove part...23:15
aelknerwhat about it23:15
aelknerare you saying that because there is removeClass23:16
replaceafillwhen you display the menu, you mark it one way (either id or class), when you hide it, you need to mark it a different way23:16
aelknerand there is no removeId23:16
replaceafillcorrect23:17
replaceafilljquery provides methods for managing classes23:17
aelknerok, so it's a matter of language convenience23:17
replaceafilladdClass(), removeClass()23:18
aelknerthat works for me23:18
replaceafillunfortunately you will have to trust me on this one :/23:18
replaceafillanyway23:18
replaceafillcontinuing the popup change23:18
replaceafillalso, jquery allows you to traverse stuff23:18
replaceafillso you can avoid plain javascript logic23:18
aelknerhasClass?23:19
replaceafillyou had:23:19
replaceafillcurrent_menu = $('#my_menu')23:19
replaceafill(with no semicolon...)23:20
replaceafillif (current_menu.length > 0){23:20
replaceafill$(current_menu).css('visibility', 'hidden');23:20
replaceafill$(current_menu).attr('id', '');23:20
replaceafill}23:20
replaceafilllet's only focus on the if23:20
aelkneri know what i had23:20
replaceafilli know you know :)23:20
replaceafilli'm only making my point23:20
aelknersure, go ahead23:20
replaceafillthere, you're checking if there are elements with #my_menu ids, correct?23:21
aelknerright23:21
replaceafillthat's what the > 0 is doing23:21
replaceafillbut you can go ahead and do: $('#my_menu').css('something', 'value');23:21
replaceafillif there's not element with #my_menu identifier, nothing happens23:21
replaceafillyou dont get an error23:22
replaceafillyou this type of checking is unnecessary23:22
aelknerif ($(e.target).hasClass('activity_heading') == false) {23:23
replaceafillhold on, one more thing23:23
aelknerif the place they click is not an activity link23:23
replaceafillbefore i get there23:23
replaceafillyou had: menu = e.target.parentNode.parentNode.firstElementChild23:24
replaceafillthat's traversing the DOM23:24
replaceafillagain, jquery provides methods for traversing using ids and classes23:24
replaceafilllike parentsUntil(selector)23:24
aelknerwhat does that do?23:24
replaceafillit gets you all the parent elements that match the selector23:25
replaceafill$(this).parent().prev('ul.popup_menu').addClass('activity_menu');23:25
aelkneryeah, i don't get that one23:26
replaceafillthere ^ im refering to the link (the title of the activity)23:26
replaceafillthe one the user does click on23:26
replaceafilldoes click on -> clicks on :)23:26
replaceafillso, this is the <a ...> element in the dom23:26
replaceafill$(this) makes it a jquery object23:27
replaceafillwith jquery methods23:27
replaceafillthis is very important23:27
aelknerthat part i got23:27
replaceafillok23:27
replaceafillthen jquery objects have a parent() method23:27
replaceafill(i suppose you know what it does)23:27
aelknerthe same as parentNone?23:27
replaceafilland jquery objects have a .prev(selector)23:27
replaceafillmethod23:27
aelknerparentNode23:27
replaceafillbut your traversing depends on the node23:28
replaceafilljquerys depend on selectors23:28
aelknerso parent() applies to all elements selected23:28
aelknerno sorry, that's not what i meant23:28
replaceafillno, to the element you clicked on23:28
aelkner$(this) is a specific node23:28
aelknerand .parent() is its parent ode23:29
replaceafillit's a jquery object for its parent node :)23:29
aelknerright, everything stays wrappend in jquery23:29
replaceafillremember, jquery != node23:29
replaceafillcorrect23:29
replaceafillso, you get the parent as a jquery object23:29
replaceafilland then23:29
replaceafillthe html produced is:23:30
replaceafill<div class="idontremember">23:30
replaceafill<ul class="popup">23:30
replaceafill<li>s23:30
replaceafill</ul>23:30
replaceafill<div>23:30
replaceafill<a>23:30
replaceafillhold on23:30
replaceafilllet me start the instance better... :)23:30
replaceafill       <div class="padded">23:31
replaceafill         <ul class="popup_menu">23:31
replaceafill           <li>23:31
replaceafill             <span>A1</span>23:31
replaceafill           </li>23:31
replaceafill         </ul>23:32
replaceafill         <div>23:32
replaceafill           <a class="activity_heading"23:32
replaceafill              href="gradeActivity.html?activity=Activity"23:32
replaceafill              title="A1">A1</a>23:32
replaceafill         </div>23:32
replaceafillthe user clicks on a.activity_heading23:32
replaceafillthat's "this" in that method23:32
replaceafillparent gets you to the plain <div>23:32
replaceafillthen you have .prev('ul.popup_menu')23:32
replaceafillprev and next are for finding siblings23:32
* hoffman goes to make dinner.23:32
replaceafillchildren of the same parent23:33
hoffmanI can talk to aelkner later about the hiding implementation.23:33
replaceafillaelkner so, prev(...) gives us the list23:34
replaceafilland we finally add a class to it23:34
replaceafilli called it "activity_menu"23:34
aelknerso prev() and next() are again more powerful than regular js because they support selectors23:34
replaceafillcorrect :)23:34
replaceafilli mean, you can do all of this in plain javascript, but it's really painful :(23:35
aelknerwell, i did it, and it didn't kill me, but i see that jquery is nicer23:35
aelknerand using selectors is very convenient23:35
replaceafillit's because you're too good23:35
replaceafill:P23:35
aelknergee thanks, i just used firebug and found the methods there :)23:36
replaceafill:D23:36
replaceafillok23:36
replaceafillfinally, the comparison23:36
replaceafillif ($(e.target).hasClass('activity_heading') == false) {23:36
replaceafille.target is again a dom element23:36
replaceafillwhere the element was carried23:36
replaceafillsorry23:36
replaceafillwhere the event was carried23:37
replaceafillthis is a click event, so it means the dom element you clicked on23:37
aelknerwhich element they clicked basically23:37
replaceafillcorrect :)23:37
replaceafillsee that this is bind to the document23:37
replaceafill$(document).click(function(e) {23:37
replaceafillthat's why you need e.target instead of this23:38
aelkneryep23:38
replaceafillso, you check that the <a ...> element has an activity23:38
replaceafillsorry, that doesnt have the class activity23:38
replaceafilldamn!23:39
replaceafillthat the element doesnt have the 'activity_heading' class23:39
replaceafill:)23:39
replaceafillwhich only activity titles have23:39
replaceafillmeaning: they clicked anywhere but an activity title23:39
aelkneri see that you hide the current menu if they click anywhere but an activity title23:40
aelknerbut what if they click on the activity menu itself23:40
aelknernot a link, but on one of the <li> elements23:40
aelknerah, wait23:41
replaceafillthe menu is hiddent23:41
replaceafilland they're taken to the link23:41
replaceafillsee that there's no "return false;"23:41
replaceafillpreventing clicks23:41
aelknerthe <li> element contains the <a>23:41
replaceafilland this check is for <a>23:42
replaceafillthe a.activity_heading to be specifi23:42
replaceafillc23:42
replaceafilllinks in the popup menu dont have this class23:42
replaceafillonly activity titles23:42
aelknerthe logic reads:23:42
aelknerif they clicked on anything other than an element with class activity23:43
aelkneractivity_heading23:43
aelknerthen make the menu disappear23:43
aelknerso if they click inside the <li> but not inside the <a> contained in the <li>, what then?23:44
aelkneri would think, in that case, the current menu should stay active23:44
replaceafilla.activity_heading are not in the li aelkner23:44
aelknerso the test passes and te men u is hidden23:45
aelkner== false23:45
replaceafillagain, note the e.target23:45
aelknerstrange that you don't see my point here, e.target would be the <li>23:46
aelknerthe test for == flase would pass23:46
replaceafillno!!!!!!!!!!23:46
replaceafillsee the html!!23:46
replaceafill^^^23:46
aelknersee what html?23:47
aelknerthe page template has it, what are you referring to?23:48
aelknerthe <li> in the page template?23:48
replaceafillhttp://pastebin.com/4Bn4rUGM23:48
replaceafillthe output html23:48
aelknerso the <li> elements there have no class="activity_heading"23:49
replaceafill:/23:49
aelknerso if one clicks on one, the test will pass23:49
replaceafillyep23:49
aelknerand the menu will be hidden23:49
replaceafilland you get to the link page23:49
replaceafillyou dont stay on that page23:49
aelknerwhy would clicking on a <li> cause a link to be visited?23:50
aelkneronly clicking on <a> does that23:50
aelknerdo you see now what i mean?23:50
aelknerthe <li> contains the <a>, but there is space in the <li> that is not inside the <a>23:51
replaceafillno23:51
replaceafillok, let's slow down23:51
replaceafillthat test is only for titles of activities, correct?23:52
replaceafilllike "Quiz", "Exam1" etc23:52
aelknerwhat test?23:52
replaceafill$(e.target).hasClass('activity_heading') == false23:52
aelknerthat test says, if the clicked element is not the activity link23:53
aelknerthat's obvious23:53
replaceafillyes23:53
aelknerso you hide the active menu if anything other than the activity link is clicked23:53
replaceafillcorrect23:53
aelknerso if the user clicks an <li>, but not the <a> contained therin23:54
replaceafillbecause you could have clicked on another activity title23:54
aelknerthe menu disappears23:54
replaceafillaelkner!!!23:54
replaceafillthe <a> you're referring to are not activity titles23:54
replaceafillthey are menu options23:54
aelkneri know that23:54
aelknerso?23:54
replaceafillso if you click on one of those, the menu is hidden23:54
replaceafillcorrect?23:55
aelknerif you click on one of the <a> elements inside the menu?23:55
replaceafillyes23:55
aelknerthen the link is visited and the whole page is reloaded23:55
replaceafillyes...23:56
aelkneri'm not referring to that23:56
aelkneri'm talking about the <li>23:56
aelknerclicking on the <li> i sot the same as clicking on the <a> it contains23:57
replaceafillsot?23:57
aelknertell me understand that point, please23:57
aelkneri've been saying it a million times, i don't know how to say it differently23:58
replaceafill:D23:58
aelknersot -> not23:58
aelknersorry23:58
aelknerdidn't see the typo23:58
replaceafill:)23:58
replaceafillok, you start over this time...23:58
aelknerok, i'm referring to the logic for handling the user clicks on the <li> of an active menu23:59
aelknerbut not on the <a> therein23:59
aelknerthe test == false will pass23:59

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!