-
Notifications
You must be signed in to change notification settings - Fork 34
rewrite series sales block to react #1439
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
rewrite series sales block to react #1439
Conversation
Generated by 🚫 Danger |
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.
Thank you for the PR!
See the comments. The main issue is that we should make a GET request and obtain the data from a server.
335256f
to
2b6e6e4
Compare
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.
Hi, thank you for the update! See my comments.
Also:
- ``Fix /account/register: add clarification about using user's e-mail #123` should be written with a space between word and hash. Otherwise GitHub doesn't recognize it. I've fixed PR's title but the commit message should be fixed as well.
- commit message should start with a type of a change. Example:
refactor: rewrite the series sales block to React
P.S. Please, pull the changes from upstream and rebase your branch. |
3a21fb5
to
84e2b49
Compare
1863af5
to
e40fb68
Compare
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.
I left some comments.
Heh, it's turned out that this task isn't simple.
const { sale, index, l10n } = this.props; | ||
const hasBuyer = !!sale.buyerName; | ||
const hasCondition = !!sale.condition; | ||
const hasDate = !!sale.condition; |
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 looks totally wrong.
</a> | ||
) | ||
} | ||
} |
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.
A file should have a newline at the end.
f85470f
to
46f7b37
Compare
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.
See my comments.
Also, we need to update the changes and pull the changes from master branch (and resolve a conflict).
class SeriesSaleItem extends React.PureComponent { | ||
render() { | ||
const { sale, index, l10n } = this.props; | ||
const hasBuyer = sale.buyerName !== undefined; |
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.
Why you rewrote !!sale.buyerName
with sale.buyerName !== undefined
?
071f755
to
f823cee
Compare
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.
See my comments. Also, even if I'd like to merge the change, I can't because CI is read and some tests fail. Do you know why they fail?
Let me know if you need my help.
f823cee
to
f2c13f5
Compare
@@ -34,7 +34,7 @@ | |||
// MUST be updated when any of our resources were modified | |||
public static final String RESOURCES_VERSION = "v0.4.3.12"; | |||
|
|||
// CheckStyle: ignore LineLength for next 15 lines | |||
// CheckStyle: ignore LineLength for next 18 lines |
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.
Why 18? You added a one line, so I'd expect that it should be 16
This error happens because when we make a GET query to a server, we got HTML page back as there is no API yet. We should turn the component off until we have implementation on a backend. I added |
Please, update master and rebase your PR first. |
4b1b731
to
e58b87a
Compare
cdb10f7
to
cf3747a
Compare
The error messages on the PR page are outdated because danger failed to install: #1453 |
There also many errors like this:
I was able to reproduce it locally in a browser. In development mode the error is the following:
Why it happens? The target <div id="series-sales-list" sec:authorize="hasAuthority('VIEW_SERIES_SALES')" togglz:active="USE_REACT"></div> But it isn't activated by default and the div isn't here. So, when react tries to render the content into the div, it couldn't find it and fails. In order to fix this, the logic for rendering the component also should be wrapped into toggle:active. |
I've submitted PR to you: bahoss#1 |
The issue has been fixed. |
@bahoss Could you squash the commits into one and rebase on top of the master (need to update it first)? |
9cbb9c4
to
956dee7
Compare
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.
LGTM! Thank you! 👍
Fix #1329