Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Conversation

@larz0
Copy link
Member

@larz0 larz0 commented Sep 10, 2013

See #5147

@njx
Copy link

njx commented Sep 23, 2013

This looks a lot nicer. Looking at it now, though, I wonder if it would make more sense to group the version number with the date, since those are logically related. So how about:

Extension Title
Author
Version x.x.x -- yyyy-mm-dd

(I thought it might be nice to add the label "Version", and there's probably room anyway, but don't feel strongly either way.)

@larz0
Copy link
Member Author

larz0 commented Sep 24, 2013

@njx updated and it definitely looks much better now. The author name link competes with the extension name visually but once #4930 is merged then hopefully we can restore balance to this universe.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's redundant code between these two cases, and also we should account for the possibility that there's no userId (although that probably won't happen, the existing code did show something in that case). So I think you could collapse the whole thing into something like:

if (this.metadata && this.metadata.author) {
    result = htmlEscape(this.metadata.author.name || this.metadata.author);
} else if (userId) {
    result = htmlEscape(userId);
}
if (ownerLink) {
    result = "<a href='" + htmlEscape(ownerLink) + "' title='" + htmlEscape(ownerLink) + "'>" + result + "</a>";
}

@njx
Copy link

njx commented Sep 24, 2013

Yup, I like this layout. Just one code review comment.

@njx
Copy link

njx commented Sep 24, 2013

Also, this breaks one of the unit tests due to the format change (ExtensionManager-test, "should populate itself with registry entries and display their fields when created"). I'll push up a fix for that after you've made your fix.

@larz0
Copy link
Member Author

larz0 commented Sep 24, 2013

@njx fixed.

@njx
Copy link

njx commented Sep 24, 2013

Fixed unit test. Merging.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants