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

Show statistics broken down by wiki family on event page #77

Merged
merged 1 commit into from Jul 25, 2018

Conversation

MusikAnimal
Copy link
Member

@MusikAnimal MusikAnimal commented Jul 23, 2018

Some refactoring of related Twig templates.

Remove unused 'event_valid' field from event table, instead doing
validation in the model layer with Event::isValid().

Add message indicating event is missing required options before
statistics can be generated.

Change font to Roboto, and remove unused font file.

Bug: https://phabricator.wikimedia.org/T192579

Copy link
Member

@mooeypoo mooeypoo left a comment

Choose a reason for hiding this comment

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

Code looks good, note there are minor changes also asked for labels in the ticket

i18n/en.json Outdated
@@ -55,6 +55,9 @@
"event-data": "Event data",
"event-data-for": "Event data for \"$1\"",
"event-deleted": "The event '$1' was deleted.",
"event-in-future": "Statistics can't be generated because this event takes place in future.",
Copy link
Member

Choose a reason for hiding this comment

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

"... takes place in the future" (missing 'the'?)

@@ -221,6 +215,18 @@ public function getCacheKey()
return (string)$this->id;
}

/**
* Is the Event valid? If false, statistics will be able to be generated.
Copy link
Member

Choose a reason for hiding this comment

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

If false, statistics will not be able to be generated...

public function isValid()
{
return $this->wikis->count() > 0 &&
$this->start !== null &&
Copy link
Member

Choose a reason for hiding this comment

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

Ther'es also 'event-in-future' which says that the statistics can't be done because the event is in the future -- do we need to add that test in the validity here?

@MusikAnimal MusikAnimal force-pushed the wiki-breakdown branch 2 times, most recently from 5d44de0 to 5d3cef7 Compare July 25, 2018 04:09
@MusikAnimal
Copy link
Member Author

@mooeypoo Thanks for identifying all those careless errors! =p All fixed.

@mooeypoo
Copy link
Member

The commit looks good -- just one thing - the commit message (and, by proxy, the first comment in this PR) is not really right... it makes it sound all you did was remove event_valid.

This commit has quite a number of changes that are tangential, like changing fonts, splitting the twig templates, adding a validation method, etc. Can you just quickly write a more summarizing commit message, for posterity?

Once that's done, I think the PR can be merged!

Some refactoring of related Twig templates.

Remove unused 'event_valid' field from event table, instead doing
validation in the model layer with Event::isValid().

Add message indicating event is missing required options before
statistics can be generated.

Change font to Roboto, and remove unused font file.

Bug: https://phabricator.wikimedia.org/T192579
@MusikAnimal
Copy link
Member Author

GitHub makes the first line of the commit message the title of the PR, and the rest as the description. Not sure if you saw the whole thing? f529e9c said:

Show statistics broken down by wiki family on event page

Remove unused 'event_valid' field from event table.

Add message indicating event is missing required options before
statistics can be generated.

Change font to Roboto, and remove unused font file.

Bug: https://phabricator.wikimedia.org/T192579

but I just forced pushed back, adding even more info :) Now it's at a6a85a9

@mooeypoo
Copy link
Member

... I think I was looking at an earlier one? In any case, we can also edit the top comment on the PR so that when/if we look at it on Github it's all there.

@mooeypoo mooeypoo merged commit 676a70a into master Jul 25, 2018
@mooeypoo mooeypoo deleted the wiki-breakdown branch July 25, 2018 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants