-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
@dangoor @peterflynn @larz0 Here we go folks. First pass. Maybe we could use a different icon for the themes tab |
@MiguelCastillo you sir, are a legend. BTW I have a feeling you can create branches on the brackets repo from now on since you're a committer now? Looks great! |
@MiguelCastillo here's the themes icon: http://cl.ly/372J3W0R423H |
@@ -519,6 +519,7 @@ define({ | |||
"REGISTRY_SANITY_CHECK_WARNING" : "NOTE: These extensions may come from different authors than {APP_NAME} itself. Extensions are not reviewed and have full local privileges. Be cautious when installing extensions from an unknown source.", | |||
"EXTENSIONS_INSTALLED_TITLE" : "Installed", | |||
"EXTENSIONS_AVAILABLE_TITLE" : "Available", | |||
"EXTENSIONS_THEMES_TITLE" : "Themes", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit: there is a tab char used for indentation.
@larz0 the icon looks sooooo good!!! :D |
Hey @MiguelCastillo, this is awesome! Thanks for getting this together so quickly. A quick comment: there are lots of tests for the Extension Manager, so I don't think we'd want to land this without one. Can you add a test or two for the new functionality? |
@dangoor yeah that makes sense. I will take a look tomorrow. |
This is great. In the past we discussed about adding images that represent a theme to the zip, and a name in the package so that we could show them in the installer, making it easier to find a good theme. Are we planning on adding this now, or later? |
@TomMalbran If you do add it, I think that a nice way of showing them could be clicking on a scaled down version of the extension's image (maybe about 16x16px) in the top right corner, so as not to interfere with extensions such as https://github.com/dnbard/brackets-extension-rating that add content below the extension's name. The way I would prefer seeing the image would be in a modal that pops up, as I've never liked in-line images too much, especially when they can be quite large (as in this case). My main reasoning for not liking inline images is that it is often difficult to hide them once they have been opened (or at least takes a fair bit of scrolling). As well as the above, are there any plans for moving the |
@Mark-Simulacrum I am thinking that the image could just replace the description, since an image is the best way to describe. We would then have enough space to show a reasonable size thumbnail where is easy to see the theme, but not big enough so that it takes too much space. Additionally it could be expanded into a modal dialog. If a theme doesn't provide an image we can then just show the description. |
@TomMalbran That sounds good, perhaps the image could expand when clicked on? I still worry about the size of the image being an issue. |
@TomMalbran Images are tricky, but I agree that they're ideal. The trickiness comes in two forms:
Come to think of it, the second problem basically applies to both cases. I don't think we should hold up this pull request trying to get images in, because this pull request is a good step forward given the number of themes we've got. That said, adding images would be a big win, so it's worth figuring out the right approach. Perhaps that discussion should occur in a separate bug, though, so that this PR can move forward as-is... |
…istry. Added unit tests
@dangoor I added a simple unit test for this to verify that the themes viewmodel is loading things up correctly. Most other stuff is just tested in the other unit tests... One thing I changed is that there can be multiple calls to downloadRegistry... If there is a call already pending, then I return the promise that's keeping track of that request. This allows me call downloadRegistry from the themes viewmodel and the registry viewmodel without generating multiple requests. |
@dangoor I didn't thought about the zip issue. I thought it would be easier to implement. Anyway I wasn't expecting this to be added to this PR, I was just starting a discussion about it. It can be implemented later, since I think that we need to change the registry so that it can get the images. |
@@ -494,7 +500,81 @@ define(function (require, exports, module) { | |||
} | |||
return entry; | |||
}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is only a minor nit to have one line separation between the functions. Makes is more consistent with the rest of the source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I realized the rest of the world mostly likes one line between functions. I get really claustrophobic with 1 line. I will change it though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry! :-)
It's about consistency. I had this kind of discussions 1000 times in other teams. Style is a very sensitive topic and every team I've worked with had different ideas about the ideal solution in mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah you are absolutely correct. Consistency trumps most things. :)
@MiguelCastillo It looks good to me. I think I'm going to merge it soon when you are done. Great to see this land in 0.43. |
@@ -180,7 +188,12 @@ define(function (require, exports, module) { | |||
* or rejected if the server can't be reached. | |||
*/ | |||
function downloadRegistry() { | |||
var result = new $.Deferred(); | |||
if (pendingDownloadRegistry) { | |||
return pendingDownloadRegistry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be return pendingDownloadRegistry.promise();
?
…mpty lines between functions
That looks good to me. Thanks @MiguelCastillo. |
No problem dude! |
Wanted to belatedly add a few thoughts to the theme-thumbnails thread here... (post-1.0, it'd be good to start a discussion on brackes-dev to move this along further, though)
|
Ideally we should be using static previews instead of a preview images for themes. I actually feel really strongly about this one and I think I've mentioned this far too many times. |
@larz0 What do you mean by 'static preview'? |
@peterflynn by 'static preview' I meant a read-only preview of the theme achieved by applying the theme's stylesheet to a sample code area that resembles Codemirror. |
#8691