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

Walkthrough for new label UI #791

Merged

Conversation

GabrielKS
Copy link
Contributor

Adds a walkthrough button and tour for the new label UI. Planning to make this play the first time a user views the new UI; haven't done that yet.

 + Make room for walkthrough button on Label navbar
 + Add walkthrough tour targets and content
Comment on lines 618 to 621
var d = $q.defer();
$ionicScrollDelegate.scrollTop(true);
d.resolve();
return d.promise
Copy link
Contributor

Choose a reason for hiding this comment

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

can we please use standard javascript promises instead of $q? I don't see anything here that native promises don't support and I don't want to add dependencies on libraries that are already obsolete unless I have to.
https://github.com/kriskowal/q

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I just saw $q on the tour library reference and assumed that was the standard way to do it.

Comment on lines -5 to -10
<button ng-repeat="selF in filterInputs" ng-click="select(selF)" class="col col-50 button labelfilter" ng-class="{on:selF.state}" style="text-align: center;font-size: 14px;font-weight: 600;" translate>
{{selF.text}}
</button>
<button ng-click="resetSelection()" class="col col-50 button labelfilter last" ng-class="{on:allTrips}" style="text-align: center;font-size: 14px;font-weight: 600;" translate>
{{'.show-all'}}
</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

The advantage of using entries such as col-50 is that they (at least theoretically) auto-resize on different size screens. Can't you use a lower level of col - e.g. col-33 etc instead of hardcoding values?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My intent wasn't to hardcode values, it was to have the buttons automatically resize to fit the text within them, which they do now. Is that objectionable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before I first got to this code, there was a width parameter stored in each infinite_scroll_filter. I changed it to use the col values because that was hardcoded (and not accommodating of multiple languages), but my new solution seems even less hardcoded.

 + That plus a few final tweaks to the walkthrough itself
Comment on lines 634 to 637
var d = $q.defer();
$ionicScrollDelegate.scrollTop(true);
d.resolve();
return d.promise
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is the replacement

Suggested change
var d = $q.defer();
$ionicScrollDelegate.scrollTop(true);
d.resolve();
return d.promise
return new Promise(function(resolve, reject) {
$ionicScrollDelegate.scrollTop(true);
resolve();
});

 + Go back to using col-XX for width
 + Use Promise instead of $q
@shankari shankari merged commit d7e8cca into e-mission:ceo_ebike_project_stage Aug 19, 2021
GabrielKS pushed a commit to GabrielKS/e-mission-phone that referenced this pull request Aug 19, 2021
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