Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Added fix for Issue 59: Instructions to search for items #68

Merged
merged 4 commits into from
Mar 27, 2017

Conversation

mehulsr
Copy link
Contributor

@mehulsr mehulsr commented Mar 20, 2017

Fixes #59
Trying to figure out how to add link to README.md

@TimMoore
Copy link
Contributor

@mehulsr here is a pointer for linking to the README: https://www.playframework.com/documentation/2.5.x/JavaTemplates#Escaping

@@ -12,6 +12,8 @@

<h2>@message("searchItems")</h2>

<p>@message("searchInstructions")</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please be sure to use spaces rather than tabs for indentation.

If you're using Eclipse, here is a guide for configuring it to use spaces: http://stackoverflow.com/a/408449/29470

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will fix this in the next commit.
I'm not using any IDE at the moment, but the Atom Editor. Is it advisable to use an IDE?

Copy link
Contributor Author

@mehulsr mehulsr Mar 20, 2017

Choose a reason for hiding this comment

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

Fixed this in new commit.

@@ -85,3 +85,6 @@ invalid.duration=Please enter a valid duration
invalid.units=Please enter a valid unit

createUserInstructions=Here you can create a new user who can participate in and create auctions.
searchInstructions=Here you can search for auctioned items. Search functionality can be enabled by downloading and running a local instance of elasticsearch. \
Steps for doing this can be found in README.md.\
You can filter your search by specifying the maximum price of items to search for and the currency to search in.
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @mehulsr, thanks for this contribution.
I have a question: are the newlines preserved when rendering this message in HTML? Or put another way, will this message be rendered as 3 <p> blocks? If not, is there

I think we could rewrite them so that the generic instruction on how to use the feature appear first (since they always apply), and the details on how to get the feature up and running (install ES and/or check README) appear last. Also, I think it's worth mentioning that once the system is started, there's no need to restart it when installing and running ES since the search service will be able to recover.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @ignasi35
The newlines are not preserved at the time of rendering in HTML.
I shall reorder the instructions in the next commit to separate general search instructions and installation instructions.

Copy link
Contributor Author

@mehulsr mehulsr Mar 20, 2017

Choose a reason for hiding this comment

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

Fixed this in new commit.

@ignasi35 ignasi35 mentioned this pull request Mar 20, 2017
@TimMoore
Copy link
Contributor

Do you still intend to add a link to README.md @mehulsr?

@mehulsr
Copy link
Contributor Author

mehulsr commented Mar 21, 2017

@TimMoore Yes I think it would be appropriate. I'll try to do it one more time, else we can close the PR?

@TimMoore
Copy link
Contributor

OK no worries, just let us know when you're ready for us to merge it.

@mehulsr
Copy link
Contributor Author

mehulsr commented Mar 21, 2017

Yes, sure 😃

@mehulsr
Copy link
Contributor Author

mehulsr commented Mar 22, 2017

@TimMoore @ignasi35
It took me a while to figure out, but I added link to the README.md file in search instructions. Currently, this link downloads the README.md file or shows it in the browser (if a Markdown plug in is enabled).
I have also updated the instructions naming convention as suggested in this PR.
Please review and suggest modifications.

@@ -22,3 +22,5 @@ GET /search controllers.SearchController.searchForm(
POST /search controllers.SearchController.search()

GET /assets/*file controllers.Assets.at(path = "/public", file)

GET /*file controllers.ExternalAssets.at(path="../", file)
Copy link
Contributor

Choose a reason for hiding this comment

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

hi @mehulsr we can't do this. With this route I can download any file in the folder including the source code (test http://localhost:9000/LICENSE or http://localhost:9000/build.sbt for example).

I think we can safely link to https://github.com/lagom/online-auction-java/blob/master/README.md on the instructions (in which case this route won't be necessary).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yes that's true. Okay, pushing with this change now

Copy link
Contributor

@ignasi35 ignasi35 left a comment

Choose a reason for hiding this comment

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

We can't suggest using a route that exposes all the repository.

@mehulsr
Copy link
Contributor Author

mehulsr commented Mar 24, 2017

@TimMoore @ignasi35 Please review the changes

@ignasi35
Copy link
Contributor

Looks great! Thanks @mehulsr

@ignasi35 ignasi35 merged commit f6bd189 into lagom:master Mar 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants