Skip to content

Conversation

agwanyaseen
Copy link
Contributor

Form Changes

Please check that the PR fulfills these requirements

  • Set a 100 character limit in your editor/IDE to avoid white space diffs in the PR
  • Tests for the changes have been added (for bug fixes / features)
  • Added yourself to AUTHORS.md

List<File> get excerciseImages => [..._excerciseImages];
final List<File> _excerciseImages = [];
String? _name;
String? _alternativeName;
Copy link
Member

Choose a reason for hiding this comment

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

the alternative names should be a string since some exercises can have several names

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's already string!

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I meant a list of strings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Every string seperated by space is new name. Correct?

Copy link
Member

Choose a reason for hiding this comment

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

Either space or newline, yes. I think newline is more obvious since some names can have whitespaces in them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to think, how we can implement these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These part is still pending, but branch is merged?

String? _name;
String? _alternativeName;
String? _targetArea;
List<String?>? _primaryMuscles = [];
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't it be better to store this a a list of Muscles? Same goes to the other stuff we get from the form, it will be easier for us later when we need to do work with those objects later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently DropDowns and MultiSelect widgets are designed to handle only Strings and not Object, that is the reason I kept it as string.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, ok. Can we store the object IDs and do a lookup when saving?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's possible , but then in UI we will only see ID and not name.
Instead we need to re-design the widgets.

Copy link
Member

Choose a reason for hiding this comment

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

Showing only the IDs is not optimal 😄, I guess we will have to think of something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool then we need to re-design the widgets,
I'll try to do them.

@rolandgeider rolandgeider merged commit c3e2775 into wger-project:feature/exercise-crowdsourcing Jan 29, 2022
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.

2 participants