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

#157731630 Creates a get exercises on hover over image body part feature #13

Merged
merged 1 commit into from
Jun 8, 2018

Conversation

dondrzzy
Copy link

@dondrzzy dondrzzy commented Jun 6, 2018

What does this PR do?

This PR creates a feature that enables users to hover over a body part in the image
and display the exercises for that body part.

Add event handlers to wger/exercises/templates/muscles/overview.html
to get the required target on mouse hover over image, and display the relevant body exercises
Add flip-front and flip-back button to enable users flip the image to the back side,
in case you want to hover over the back muscles
Add default svg css to wger/core/static/css/workout-manager.css to hide the overlapping svg
images with the targeted ids and position the image over the background image.
Add a new file muscles.js with the muscles svg image variables to wger/exercises/static/js/muscles.js

Description of Task to be completed?

The user should be able to move the mouse over a body part on the image and get exercises for that body part.

How should this be manually tested?

1: Clone the application and install the requirements in your virtual environment.
2: Update the database settings in the settings.py file with your postgres user, password and database name.
3: Run the application with python manage.py runserver.
4: Register and login.
5: Hover over Exercises in the navbar menu and select Muscle overview.
6: Hover over the body parts in the image. Sample image shown below:
screen shot 2018-06-06 at 14 51 14

7: Expected response: The application should display the exercises related to the muscle you hovered over.
8: The application should also auto highlight the muscle name related to the muscle you hovered over. Sample response shown below.

screen shot 2018-06-06 at 14 47 17

The exercises are displayed in the far right section.

9: Click the front or back buttons to flip the image.

Any background context you want to provide?

This feature was not available.

What are the relevant pivotal tracker stories?

#157731630

…over body part feature

This commit creates a feature that enables users to hover over a body part in the image
and display the exercises for that body part.

Add event handlers to wger/exercises/templates/muscles/overview.html
to get the required target on mouse hover over image, and display the relevant body exercises
Add flip-front and flip-back button to enable users flip the image to the back side,
in case you want to hover over the back muscles
Add default svg css to wger/core/static/css/workout-manager.css to hide the overlapping svg
images with the targeted ids and position the image over the background image.

[Delivers #157731630]
@coveralls
Copy link

coveralls commented Jun 6, 2018

Pull Request Test Coverage Report for Build 157

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.079%

Totals Coverage Status
Change from base Build 117: 0.0%
Covered Lines: 12145
Relevant Lines: 13048

💛 - Coveralls

@@ -45,5 +46,6 @@ def formfield(self, **kwargs):
Use our custom field
'''
defaults = {'form_class': Html5FormDateField}

defaults.update(kwargs)
return super(Html5DateField, self).formfield(**defaults)

Choose a reason for hiding this comment

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

these two fields are similar, maybe you should look at them

Copy link
Author

Choose a reason for hiding this comment

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

Thanx @peterwade153 , Peter but one is date and the other is time.

@dondrzzy dondrzzy added the ready Used for PRs that your feel are completed and ready to be merged. label Jun 7, 2018
Copy link

@King-Benx King-Benx left a comment

Choose a reason for hiding this comment

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

However please endeavour to clean up your PR structure, its not readabale

@emugaya emugaya merged commit bca4f5a into develop Jun 8, 2018
@emugaya emugaya deleted the ft-exercises-muscle-hover-#157731630 branch June 8, 2018 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Used for PRs that your feel are completed and ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants