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

Add elevation into stats and dashboard and new sports #84

Merged
merged 2 commits into from
Sep 1, 2021

Conversation

paf38
Copy link

@paf38 paf38 commented Aug 20, 2021

For my usage, I need more sports into your great app ! I didn't include picture associated with news sport.

And for people who living in mountains, elevation parameter is essential

@SamR1
Copy link
Owner

SamR1 commented Aug 21, 2021

Hi!

Thanks a lot for your pull request :)

I'm glad this app is useful to you :). Some features are still missing.
And thanks for your feeback. The existing sports are the ones I practice, so they are not many of them :D.
So no problem adding more.

Quick feedback:

  • a migration is missing to add new sports for existing applications
  • js build is also missing (it generated with make build-client, I can add it if you want)
  • existing sport colors are changed. I prefer to keep the existing ones. Maybe a missing feature would be to allow users to change sport color in charts and store them in user preferences.
  • for total ascent and descent charts, maybe an area chart would be more suitable?

kind like this one:

With stacked areas in case several sports are displayed?

  • no problem for pictures, I can add them.

for example, this ones from the same author (I only modified mountain bike picture to add power icon for electric mountain bike):
Screenshot 2021-08-21 at 12-27-05 FitTrackee - Administration

@paf38
Copy link
Author

paf38 commented Aug 23, 2021

Hi !!

Thanks for your quick answer :) I'm not familiar with pull or merge request with git. So excuse me to attempt to push it on master.

I didn't seen which sports picture you use (author) but they are perfect ! If you can add it, it would be great.

About your feedback :

  • What I have to add for sport migration missing ? I can do it if necessary

  • Yes you can build-client if you want or I can do it

  • I've added colors because with more sports, it was necessary to not have the same color for different sport. So, in order to have complementary colors, I replaced all but I understand you want to keep it (https://coolors.co/). But can you add more complementary colors in your app ?

  • For ascent and descent, I think stats by week, month and year like duration, distance are very usefull for me. And look at it, display is very cool with your design :
    image

I'm not full time developper but I can help to add features like heart rate stats, burned calories or other things.

Thanks a lot

Antoine

@SamR1 SamR1 changed the base branch from master to add-elevation-data-and-new-sports August 25, 2021 09:26
@SamR1
Copy link
Owner

SamR1 commented Aug 25, 2021

Hi,

I created a new branch, so I could add new sport icons and build client after merging your PR.

To add new sports with a migration, you have to generate empty migration (note: for now, there is no command to generate empty revision in Makefile) and insert new sports.

Here is an example, in order to add a migration without generating empty one:

fittrackee/migrations/versions/17_cee0830497f8_add_new_sports.py

""" Add new sports

Revision ID: cee0830497f8
Revises: 4e8597c50064
Create Date: 2021-08-25 13:58:52.333603

"""
from alembic import op

# revision identifiers, used by Alembic.
revision = 'cee0830497f8'
down_revision = '4e8597c50064'
branch_labels = None
depends_on = None


def upgrade():
    op.execute(
        """
        INSERT INTO sports (label, img, is_active)
        VALUES ('Mountain Biking (Electric)',
        '/img/sports/electric-mountain-biking.png',
        True);
        """
    )


def downgrade():
    op.execute(
        """
        DELETE FROM sports
        WHERE label = 'Mountain Biking (Electric)';
        """
    )

(I can add it if you prefer).
The new sports will be added after the existing ones, so init_database in database_utils.py must be updated to keep the same order.
It also impacts colors order on client side.

About new sport colors:

  • here is the existing order and colors
    Capture d’écran_2021-08-25_11-34-51
    Screenshot 2021-08-25 at 13-08-12 FitTrackee - Statistics

  • with new colors (keeping existing sport order)
    Capture d’écran_2021-08-25_11-40-26
    Screenshot 2021-08-25 at 13-08-42 FitTrackee - Statistics

  • I tried to mix existing colors with the lighter version of some colors from the complementary colors palette, I'm not sure about the result:
    Capture d’écran_2021-08-25_13-36-34
    Screenshot 2021-08-25 at 13-36-00 FitTrackee - Statistics

Can you come up with a color palette that would work for you while keeping colors fairly close for existing sports?

About ascent/descent chart, I'm sorry I wasn't clear: I only suggested to change chart display, with ascent and descent on the same chart (but keeping the same axes).
However stacked areas don't work well. I will keep it like that, with existing chart display :).
(anyway changing chart display requires more changes and I'm currently working on client alongside adding social features, so some new features and major changes will be waiting.)

And thank for your help offer :).
Although issues are opened for these features, I haven't worked on them at all, so no problem to open new merge requests. I'm not familiar with Github Discussions, but we can use it if you have some points you want to discuss :)

@paf38
Copy link
Author

paf38 commented Aug 28, 2021

Hi !

Ok nice :)

I didn't seen the migration part. Can you add them for this time?

For colors, I don't have a favorite, I used the ones I pushed so as not to have an overlap and display all added sports.

I like your lighter colors but as you indicated here: #90, It would be nice to be able to change them.

For ascent and descent charts, I like what you did. I don't think update is needed.

I'm familiar with github chat too, do you have a matrix, signal or other account so that we can communicate more easily?

I think we can work with pull requests like this for the next features. The next one that I would like to add is ascent and descent in the user's records and also the mass import without GPX (rower for example)

After that, I think it can be interesting to integrate heart rate values like this : #67

So I can work on it

@SamR1
Copy link
Owner

SamR1 commented Sep 1, 2021

I'll merge this MR on add-elevation-data-and-new-sports to work on it.

I have a matrix account, I opened a room on Matrix.org: #fittrackee:matrix.org

@SamR1 SamR1 merged commit 62362fe into SamR1:add-elevation-data-and-new-sports Sep 1, 2021
@SamR1
Copy link
Owner

SamR1 commented Sep 1, 2021

Hi!

I opened a new PR, can you give a try? Thanks.

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

Successfully merging this pull request may close these issues.

None yet

2 participants