mozilla :: #calendar

12 Aug 2017
09:10arshadFallen: where should i put the themes file and other js/html files
09:11arshadright now, i have put all the files inside calendar/content
16:21Fallenarshad: base/themes/ should work?
16:22FallenI'm on mobile, may not be able to give complete answers
18:07arshadFallen: nvm the dialog question
18:17arshadFallen: could we have a meeting tomorrow?
18:52arshadI remember that you said
18:52arshad> The layout is somewhat historical where it still had the split between Sunbird and Lightning, that is why you see calendar/lightning/ directory. You should check out the files in calendar/base/public
19:10Fallenarshad: tomorrow around this time might work
19:11arshadany time
19:11arshadFallen: just need to ask few questions
19:11Fallensure. I can answer some via chat now if you like?
19:12arshadFallen: Should I rename the files or I let it be as it is and just put the files in calendar/base/content
19:12arshad?
19:14arshadFor themes file, i am thinking of adding an identifier(`-html`) at the end of css files e.g., `input-html.css` or something else that you maylike
19:14arshadthis way I can put those css files in /cal/base/themes folder
19:14arshadand dont have any name conflicts
19:15FallenI'd suggest to use slightly more verbose names. What kind of content would be in input-html.css ?
19:15arshadstylin for html input element
19:16arshadI have put all the react-dialogs files into /calendar/base/ccontent/react-iframes
19:16arshadsory, i am not vgood at namin things
19:17Fallenah ok, so maybe lets use calendar/base/themes/common/widgets for elements like input etc
19:17Fallenso calendar/base/themes/common/widgets/input.css
19:18arshadFallen: input styles for linux/os/win differs
19:18Fallenthen replace common with the respective os
19:19FallenFor remaining files, each OS has their own styles, and then uses @import url(chrome://calendar-common/skin/filenames.css); to import any styles common to all OS
19:20FallenAs for the dialogs and their iframes, If these are just two files I think it is ok to put them into base/content/dialogs/calendar-property-dialog-frame.html
19:20Fallenif there are more files it might make sense to do base/content/dialogs/calendar-property-dialog/frame.html
19:21arshadohk, what about the calend-prop-dialog.css files ? Is calendar/ba/th/com/iframes/cal-prop-dialog.css OK?
19:21arshadright now it lies as style.css in the directory where main script.js file is present.
19:22arshadFallen: there are atleast three js files in each react dialog
19:22arshadwhat should i do then
19:22Fallenok, then lets use a subfolder for each dialog. Maybe we can shorten it ba/con/dialogs/property-dialog/
19:23* arshad uploaded an image: Attachment (11KB) <https://matrix.org/_matrix/media/v1/download/matrix.org/kPMfNVFbgjwesLpOlCzmeuMN>
19:24* arshad uploaded an image: Attachment (11KB) <https://matrix.org/_matrix/media/v1/download/matrix.org/TTCHfffoOMFlYRwBrNThtRjx>
19:24Fallenfor css lets use ca/ba/th/com/calendar-property-dialog.css. If you need to use an extra file just for the iframe, calendar-property-dialog-frame.css
19:25arshadso for the styles.css - I should use ca/ba/th/com/calendar-property-dialog-frame.css
19:25Fallensure
19:25* arshad uploaded an image: Attachment (12KB) <https://matrix.org/_matrix/media/v1/download/matrix.org/scMFKyRFTsVDEeCkdodXbwns>
19:26Fallenkeeping everything together doesn&#39;t look so bad either though, makes it easier to change styles per dialog
19:26Fallenit would just be very different from what we&#39;ve done in the past
19:26Fallenlets go with the split now, we can move things around later if necessary
19:26arshadohk.
19:27Fallenon the last screenshot maybe you can use just dialog and tabpanel as subfolders if that works well for you
19:27arshadso in the above picture, you see there is a script.js file, /compone/calpropdia/ and /components/calpropTabpanell dir
19:28arshadohk so thos tabpanel, dialog lies insde /calen/base/content/dialogs/calendar-prop-dialog
19:28arshad?
19:29Fallenoic. Either calendar-properties-dialog/components/dialog/ or calendar-properties-dialog/dialog-component/
19:32arshad^ you meant /cal/base/contet/dialogs/cal-prop/compo/dialog ??
19:36Fallenyes
19:37arshadwhere does the global components lie?
19:37arshadIn `cal/base/content/dialogs/global-react-dialogs-components ` or something else?
19:37arshadperhaps i can use a better name, .../dialogs/global maybe?
19:37Fallenthese are potentially usable outside of dialogs, right? Then I&#39;d suggest cal/base/content/widgets/
19:37arshadyes
19:38Fallenwe already have that folder for some XBL bindings
19:39arshadohk, so for styles, I can link common style file via style tag in htm file and add all the other required css files via import ?
19:41arshadwhy @imporrt over link tag?
19:43Fallenin other code we don&#39;t always have a common file, so it was easier to just have one url to link, and then @import the common file
19:43arshadwait by common file I meant the css file for frame
19:44arshadsince that is must to have css file, I am counting it as common file
19:46Fallenah I read only half the question
19:47FallenI&#39;m a little slow this evening sorry, very tired. So you want to have that common css file and do the linking? If that is what you asked, then yes go ahead. If not I&#39;d appreciate if you could rephrase :)
19:49arshadI have this styles.css(will be renamed to cal-props-frame.css) file which has some react-dialog specific styles, that applies to all OS. I am asking whether to put that file in common folder or not?
19:50Fallenyes, sounds like a case for common
19:50arshadTo add that style file, I will adding a link tag that point to the chrome url of that file
19:50arshadand add all the xtra platform dependent css file via import in that file
19:50Fallensure, lets do that
19:51arshadWhy do u prefer @import over link tag
19:52* arshad sent a long message: arshad_2017-08-12_19:52:42.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/aQuDQEhRkJsodMzTCuLCBJeJ>
19:53arshad^ can you xplain a bit how this code make sure platform specific styles are loaded
19:54arshadanyways, lets talk tomorrow then. GN
19:54FallenYes. So the first three lines define that the files in the actual location chrome/skin/linux/calendar are made available at chrome://calendar/skin/ based on the operating system
19:55Fallenthe last line defines chrome://calendar-common/skin/
19:56Fallenwe used @import so you can just use chrome://calendar/skin/calendar-foo-dialog.css for the dialog, and it will automatically import the common file if it exists
19:56Fallenif this doesn&#39;t make sense for the react dialogs, I&#39;m open to doing it differently. Maybe talk to Paenglab also, he has some insights
19:56Fallengood night :)
19:57arshadis there anyway to stash the changes
19:57arshadin hg
19:57arshadI have changed a lot of things, and I am afraid that at the end, I will result into some strange error
19:58Fallenthe &quot;old way&quot; (but simpler) is using mq. With that, |hg qnew mypatch| to create a new patch you are working on, then you can use hg qpop to pop that patch off the stack
19:58Fallenhg qpush puts it back on
19:58arshadI have been makin changes on main branch i gues
19:58Fallenif in doubt you can always hg diff > my-changes.diff and later on just patch -p1 -i my-changes.diff
19:58Fallenhg doesn&#39;t really do branches for development
19:59Fallenthe review system is also made to accept patch files, instead of pull requests
20:00arshadhg diff doesn&#39;t show the new files that i have added
20:02arshadohk. thanks for the help. I will take a look at some hg resources in morning. Sorry to disturb you as you were tired. gn(real for this time)
20:02Fallenno worries, I&#39;ll still be around for a bit, I just can&#39;t think as fast :)
20:03arshadand yes, i tried pushin TB to git but it crashed while pushin it
20:03arshadi know it is stupid
20:03Fallenif you want to work on git you can use https://github.com/mozilla/releases-comm-central
20:03Fallenwe still don&#39;t do pull requests though
20:04arshadi ddit know that there is github repo
20:04arshadso how do you add changes?
20:04Fallenexport your patch into a .diff file, attach to bug, request review. Once reviewed set checkin-needed, and somone will push it for you
20:05arshadand janitor wil need setup for this I gues, since there is only hg version
20:05arshad?
20:06Fallenyeah I think janitor is meant to use hg. The differences between hg and git are manageable though, might be a good time to learn hg :)
20:06arshadohk. i will go with hg
20:06arshadthanks again.
20:07Fallengoing back to your question about new files, they are untracked so they are not in the diff. I don&#39;t know if hg add will make them part of the diff, I think this was a difference to git
20:08arshadif all you need to do is to push the .diff file
20:08arshadnvm
20:09Fallen:)
20:09arshadagain, patch only contains .diff right?
20:10FallenI don&#39;t quite understand the question? hg diff should give you the full patch, which is all that is needed to upload to the bug
20:10Fallenif the new files are missing, I believe hg add will put them into the diff
20:12arshadanyway to get the initial files other than makin new container,
20:12arshadon Janitor?
20:15Falleninitial? You mean before you made your changes?
20:15arshadye
20:16arshad:(
20:17Fallenyou can use mq for this. Add all your untracked files using hg add. Then hg qnew mypatch (once only) which creates a new patch on your stack with your current changes. Any time you want to update your patch, do hg qrefresh (or hg qref). Then if you want to go back to the previous state, hg qpop will do that (needs hg qref if you have made changes)
20:17Fallenyour patch files will automatically go into .hg/patches/mypatch
20:17Fallen(which is updated at each qref)
20:18Fallenhg qpush will push your patch back onto the stack if you have previously done hg qpop
20:18arshadok, but this applies when you started with hg qnew mypa...
20:18arshadi started makin changes right away
20:19Fallenyou can do this even with changes pending
20:19Fallencoming from git, I have heard hg bookmarks are easier, but I still feel like I am going to break something every time I use them
20:20arshadok ok.
20:20Fallenhttps://www.mercurial-scm.org/wiki/MqExtension
20:23Fallenif you rather want to do bookmarks, you basically do hg bookmark mypatch, then commit at will. Bookmarks are kind of like git branches.
20:23FallenInstead of stash you can use https://www.mercurial-scm.org/wiki/ShelveExtension
20:24Fallenbut in any case, I&#39;d suggest making backups into .diff files :)
20:24Fallen(if you&#39;ve already started with mq, make sure you don&#39;t use both at the same time)
20:25arshadokay
13 Aug 2017
No messages
   
Last message: 8 days and 23 hours ago