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

Adding message page, for better content sharing #381

Merged
merged 35 commits into from
Feb 20, 2017
Merged

Conversation

WojcikMike
Copy link
Contributor

@WojcikMike WojcikMike commented Oct 3, 2016

Fixes #331

This PR requires corresponding change in SC to happen

@WojcikMike
Copy link
Contributor Author

@Particular/servicepulse-maintainers please review. The PR for SC was merged, but now I need to learn when it will be released.

Copy link
Member

@WilliamBZA WilliamBZA left a comment

Choose a reason for hiding this comment

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

LGTM! A couple of suggestions around how we handle the promises for the serviceControlService service, but other than that 👍

};

vm.archiveMessage = function () {
serviceControlService.archiveFailedMessages([vm.message.message_id]);
Copy link
Member

Choose a reason for hiding this comment

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

Can we change the archiveFailedMessages method to return the promise so that it's the same as the restoreMessageFromArchive method?

It also means we can chain the vm.message.archived = true; line onto only the success portion of the POST. In case the network is down or something goes wrong with the actual HTTP comms, then we won't set the archived flag to true incorrectly.

};

vm.retryMessage = function () {
serviceControlService.retryFailedMessages([vm.message.message_id]);
Copy link
Member

Choose a reason for hiding this comment

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

Can we change the retryFailedMessages method to return the promise so that it's the same as the restoreMessageFromArchive method?

It also means we can chain the vm.message.retried = true; line onto only the success portion of the POST. In case the network is down or something goes wrong with the actual HTTP comms, then we won't set the retried flag to true incorrectly.

@WilliamBZA
Copy link
Member

👍 :shipit:

@WojcikMike WojcikMike force-pushed the add_message_page branch 2 times, most recently from 0df559f to e28f171 Compare October 12, 2016 13:27
@johnsimons
Copy link
Member

@WojcikMike this is not released as part of v1.24.

To use it call GET /errors/last/{id}, see Particular/ServiceControl@40099c0#diff-6fe7def7f518c7a5832858f293f5e95dR31

@WojcikMike
Copy link
Contributor Author

@johnsimons ok will revisit this PR

@WilliamBZA WilliamBZA changed the title [WIP] Adding message page, for better content sharing [WIP] Adding message page, for better content sharing Dec 1, 2016
@WojcikMike
Copy link
Contributor Author

@sergioc I did the changes, you can navigate to the message page by going to failed messages screen and clicking on a message name

@sergioc sergioc self-assigned this Feb 6, 2017
@WojcikMike WojcikMike changed the title [WIP] Adding message page, for better content sharing Adding message page, for better content sharing Feb 9, 2017
@WojcikMike
Copy link
Contributor Author

@Particular/servicepulse-maintainers can you please review? We believe it is ready to be shipped

@WojcikMike WojcikMike added this to the 1.7.2 milestone Feb 9, 2017
@@ -51,7 +51,7 @@
</div>

<div class="col-xs-11 failed-message-data" ng-mouseenter="message.hover2 = true" ng-mouseleave="message.hover2 = false">
<a href="#/failedMessages/{{message.id}}">
<a href="#/message/{{message.id}}">
Copy link
Contributor

Choose a reason for hiding this comment

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

@WojcikMike isn't an invidual message a child of all /failedMessages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is and it isn't :)
Previously our URL's looked as follows:
/failedMessages - failed mesasges screen
/failedMessages/{{id}} - one message screen

Becasue @WilliamBZA made a pr to provide deep linking groups he used "our" url path, so currently it looks like this:
/failedMessages - failed mesasges screen
/failedMessages/{{id}} - failed messages screen with a group of given id selected

Which means that we lacked url for this feature. Now becasue on our page we show a bit more than only failed message (as it can also be archived message, or succesfful processed message) I decided to go with path:
/message/{{id}}

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

From a nav perspective, /failedMessages is parent of both groups and individual messages, so I'd nest both children under the parent. I'd also avoid two words in oneWord to improve legibility of the URL, as well as caps. So I'd use this structure in the end:

  • /failed-messages
  • /failed-messages/group/{{group.id}}
  • /failed-messages/message/{{message.id}}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even that it looks nice, I don't like it :D.
With regards to groups, It should be more of:
/group/{{group.id}}/failed-messages
As the group is the parent entity that we care about, and group contains failed messages. So for me ^^ look more natural.
With regards to message path, as we are showing also archived messages I think we should not keep it under failed-message umbrela. Either way, I would tackle this as a separate issue, simply becasue group id path is already out there. And we can do the change of the URL's as a separate initiative with redirects from old paths to new etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Either way, I would tackle this as a separate issue, simply becasue group id path is already out there.

Yeah, thought about that as soon as I started seeing you disagree :-)

Let's leave URL formatting out of the picture for now and release the rest.

@@ -65,7 +65,7 @@ <h3 class="active group-title group-message-count">{{vm.selectedExceptionGroup.c
</div>

<div class="col-xs-11 failed-message-data" ng-mouseenter="message.hover2 = true" ng-mouseleave="message.hover2 = false">
<a href="#/failedMessages/{{message.id}}">
<a href="#/message/{{message.id}}">
Copy link
Contributor

Choose a reason for hiding this comment

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

@WojcikMike isn't an invidual message a child of all /failedMessages?

@WojcikMike WojcikMike mentioned this pull request Feb 10, 2017
@@ -390,7 +391,7 @@ h3 {
border-radius: 4px;
color: #777f7f;
display: block;
height: 130px;
// height: 130px;
Copy link
Member

Choose a reason for hiding this comment

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

Commented out?

Copy link
Contributor

Choose a reason for hiding this comment

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

@WojcikMike I'll fix this once you're done with your changes. Or you can just remove the commented out line yourself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I already removed it

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed

$controller = _$controller_;
}));

describe('retrying message', function () {
Copy link
Member

Choose a reason for hiding this comment

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

Can we improve the names of these tests? It's a bit hard to see what is being tested at a glance.

Perhaps: when retrying a message

I mean, we can be quite verbose with qUnit.

});
}));

it('message marked as resolved', function () {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps: and the retry succeeds, the message is marked as resolved

expect(serviceControlService.retryFailedMessages).toHaveBeenCalled();
});

it('failed, message not marked as resolved', function () {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps and the retry fails, the message is not marked as resolved

});
});

describe('archiving message', function () {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps when archiving a message

vm.retryMessage = function () {
serviceControlService.retryFailedMessages([vm.message.id])
.then(function() {
toastService.showInfo("Retrying the message " + vm.message.message_id + " ...");
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be shown before the promise completes

vm.archiveMessage = function () {
serviceControlService.archiveFailedMessages([vm.message.id])
.then(function() {
toastService.showInfo("Archiving the message " + vm.message.message_id + " ...");
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be shown before the promise completes

};

//to be deleted
vm.resolveButtonClicked = function() {
Copy link
Member

Choose a reason for hiding this comment

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

to be deleted?

});
};

function calculateDeleteDate(message, errorRetentionPeriod) {
Copy link
Member

Choose a reason for hiding this comment

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

calculate to me means a single result (an answer) will be provided, but this method mutates the incoming object.

Maybe the name should be updateMessageDeleteDate ?


\pard\widctlpar\sb240\sa240\b0 YOU EXPRESSLY ACKNOWLEDGE THAT YOU HAVE READ THESE TERMS AND UNDERSTAND THE RIGHTS, OBLIGATIONS, TERMS AND CONDITIONS SET FORTH HEREIN. BY CLICKING ON THE AGREE BUTTON AND/OR CONTINUING TO INSTALL OR USE THE SOFTWARE, YOU EXPRESSLY CONSENT TO BE BOUND BY THESE TERMS.\par
}
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang3081\deflangfe3081{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2 Calibri;}}
Copy link
Member

Choose a reason for hiding this comment

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

What are these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

THe file before and after is identical, I think that this checkin sneaked upon me ;)

@WilliamBZA
Copy link
Member

I suspect this was not a small and should not have been done under maintainer budget. Do you both still think the small label was appropriate?

If not, how can we better our triage process so we don't make a similar mistake again?

@WojcikMike
Copy link
Contributor Author

With regards to it being bigger than small. Yes overall I think it was. At first it seemed like small anough but after I brough @sergioc in he wanted to work on the experience between the screens to make them better and consistent. And that brough additional work. I would risk a statement that we can't make anything small when it includes UI changes.

@sergioc
Copy link
Contributor

sergioc commented Feb 15, 2017

I would risk a statement that we can't make anything small when it includes UI changes.

I wouldn't generalize it like that. That would make UI changes difficult to do because it would suffer on prioritization. This is especially dangerous since the main component of SP is the UI.

There's also the question of what's the definition of small. Is it the no. of work hours? Lines of code? Time the issue sits in progress? I can only correctly assess size if the criteria for sizing is clear.

@WojcikMike
Copy link
Contributor Author

@WilliamBZA I believe that all your suggestions were addressed

Copy link
Member

@WilliamBZA WilliamBZA left a comment

Choose a reason for hiding this comment

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

Thanks. I neatened up some promises that weren't changed by you guys too. LGTM.

Are we going to hold on shipping this until we've done #402?

@WilliamBZA
Copy link
Member

I've also added #404 to the same milestone

@WilliamBZA
Copy link
Member

Also, I think this should be a squash merge

@sergioc
Copy link
Contributor

sergioc commented Feb 20, 2017

@WilliamBZA the maintainers agreed #402 is indispensable, so I added it to the same milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants