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

As a user, I can see report parsing progress on my dashboard #28

Merged
merged 7 commits into from
Feb 12, 2021

Conversation

bterone
Copy link
Owner

@bterone bterone commented Jan 21, 2021

Closes #15

What happened

Update the dashboard to display the user's reports
✅ Create a helper function to display the report's status
✅ Add showing individual reports
✅ Update Error handling to render our own HTML pages

✅ Upgraded dependencies

Insight

Created a mock oauth for UI tests, since Wallaby doesn't expose its conn.

I tried creating a mock authentication controller before this, so that from a method we could call an environment variable to check which module to route to, but couldn't route it to there since I can't seem to write functions in the router. 🤔
Would be nice if we can do something like this

defp twitter_api do
    Application.get_env(:my_app, :twitter_api)
end

In the end I followed a similar implementation to Micky

For status, we're simply whether the total search_results that has html_caches is equal to the total number of search_results in the report.

Proof Of Work

Screen Shot 2021-01-22 at 11 03 44 AM

@bterone bterone added feature Something that brings value to the end-user backend Anything affecting the application functionality labels Jan 21, 2021
@bterone bterone added this to the 0.1.0 milestone Jan 21, 2021
@bterone bterone self-assigned this Jan 21, 2021
Base automatically changed from chore/navigation-revamp to develop January 22, 2021 01:45
@bterone bterone force-pushed the feature/report-index-backend branch 4 times, most recently from 2b7796e to a99b311 Compare January 24, 2021 10:23
@bterone bterone marked this pull request as ready for review January 24, 2021 10:35
@bterone bterone force-pushed the feature/report-index-backend branch from a99b311 to 3b63a98 Compare January 24, 2021 10:40
@bterone bterone marked this pull request as draft January 24, 2021 15:12
@bterone bterone added need more info Something that requires looking into for more detailed descriptions and removed need more info Something that requires looking into for more detailed descriptions labels Jan 25, 2021
Copy link
Collaborator

@hanam1ni hanam1ni left a comment

Choose a reason for hiding this comment

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

Few small comments 👍

lib/g_searcher/reports.ex Outdated Show resolved Hide resolved
lib/g_searcher_web/controllers/report_controller.ex Outdated Show resolved Hide resolved
Copy link
Collaborator

@hanam1ni hanam1ni left a comment

Choose a reason for hiding this comment

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

LGTM 👍

test/factories/search/report_search_result_factory.ex Outdated Show resolved Hide resolved
def index(conn, _params) do
report_changeset = Report.create_changeset(%{})
def index(conn, params) do
create_report = params[:create_report] || Report.create_changeset(%{})
Copy link

Choose a reason for hiding this comment

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

I am wondering why we need this and can we pass params directly to changeset 🤔 ?

Copy link
Owner Author

Choose a reason for hiding this comment

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

This is when we're re-rendering the page to display the error, we would want the Ecto.Changeset to be rendered instead of the Report.create_changeset 🤔

@bterone bterone merged commit bed906a into develop Feb 12, 2021
@bterone bterone deleted the feature/report-index-backend branch February 12, 2021 04:22
@bterone bterone mentioned this pull request Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Anything affecting the application functionality feature Something that brings value to the end-user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a user, I can see report parsing progress on my dashboard
3 participants