Skip to content
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

Scroll BubbleCalendar year chart horizontally and tooltips vertically #332

Merged
merged 20 commits into from
Feb 28, 2017

Conversation

MohammedElsayyed
Copy link
Member

This pull request fixes #214 and #328 .

  • Add a horizontal scrollbar to BubbleCalendar year chart to avoid exceeding window width in the future.

  • Make BubbleCalendar tooltips scrollable to avoid exceeding window height when a specific day contains too many snapshots.

I merged changes done in issue #214 (PR #317) into this PR. I expect this branch 'scrollbars' will handle all scroll-related issues.

@ldko ldko self-requested a review February 17, 2017 20:39
Copy link
Member

@ldko ldko left a comment

Choose a reason for hiding this comment

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

Hi @MohammedElsayyed, I looked at this in use at http://web.archive.bibalex.org/web/20050915000000*/http://google.com, and it seems to be working well and an improvement on the way the tooltips in BubbleCalendar had been functioning previously.
I think the PR mostly looks good--just had comments regarding minor code cleanup. I am assigning @runderwood as a reviewer on this too because he has greater knowledge regarding JavaScript than me.

Thanks!

@@ -0,0 +1,9 @@
var x = "Mohamed";
console.log( x );
Copy link
Member

Choose a reason for hiding this comment

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

Seems like we shouldn't need the first two lines here.

@@ -239,7 +244,7 @@ $().ready(function(){

<div class="clearfix"></div>

<div id="wbChart" onmouseout="showTrackers('none'); setActiveYear(startYear);">
<div id="wbChart" onmouseout="showTrackers('none'); setActiveYear(startYear);" style=" width: 963px; height: 118px;" >

Copy link
Member

Choose a reason for hiding this comment

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

superfluous space in style=" width:

int monthWidth = 5;
int startYear = Timestamp.getStartYear();

for (int year = startYear; year <= Calendar.getInstance().get(Calendar.YEAR); year++)
imgWidth += yearWidth;
imgWidth = yearWidth * ( Calendar.getInstance().get(Calendar.YEAR) - startYear + 1 );

Copy link
Member

Choose a reason for hiding this comment

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

Strictly a style comment, but in order to maintain consistency with the pre-existing code in this file, it makes sense to me to remove the extra whitespace after the open parentheses and before the close parentheses and in other changes made in this PR that add extra whitespace inside parentheses and curly braces.

@ldko ldko requested a review from runderwood February 17, 2017 21:32
@runderwood
Copy link
Contributor

@MohammedElsayyed It doesn't appear to be part of this pull request, but it looks to me (and I'm unfamiliar w/ the code) that there's no header included in BubbleCalendar.jsp. Shouldn't there be something like this before L17?

<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" />

Copy link
Contributor

@runderwood runderwood left a comment

Choose a reason for hiding this comment

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

The behavior is way, way better, to me. Code looks good.

As for the header issue (seems to be missing from BubbleCalendar.jsp) which doesn't originate in @MohammedElsayyed's branch, should I open an issue and fix that myself? @ldko

@ldko
Copy link
Member

ldko commented Feb 21, 2017

@runderwood, it is problematic that we aren't including UI-header.jsp. I will open an issue to discuss this as I think handling it properly will require more than just an include of the existing header.

I also noticed that in BubbleCalendar.jsp the submit button value is hardcoded to "Go Wayback!", but to support localization we should probably be using:
value="<%= fmt.format("UIGlobal.urlSearchButton") %>"
What do you think about changing that @MohammedElsayyed ?

@MohammedElsayyed
Copy link
Member Author

MohammedElsayyed commented Feb 21, 2017

@runderwood I agree with @ldko. Thank you for opening this issue.

@ldko of course, I will update the pull request. Thanks!

@ldko ldko merged commit 1280b9a into master Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In BubbleCalendar, year chart increases horizontally every year
3 participants