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 the forward arrow as an option for md & wp mode #5993

Closed
brandyscarney opened this issue Mar 30, 2016 · 10 comments
Closed

Add the forward arrow as an option for md & wp mode #5993

brandyscarney opened this issue Mar 30, 2016 · 10 comments
Assignees
Labels
help wanted a good issue for the community
Milestone

Comments

@brandyscarney
Copy link
Member

Should be able to add an option to enable the forward arrow on items similar to ios.

Forum post:
https://forum.ionicframework.com/t/android-arrow-forward-not-showing-up-for-button-ion-item/42922

Can probably set a variable that determines whether or not to add the forward arrow and default it to false for these platforms in order to match the design guidelines, yet let the user set it to true to enable it.

Material Design list guidelines: https://www.google.com/design/spec/components/lists.html#lists-specs

Relevant code: https://github.com/driftyco/ionic/blob/2.0/ionic/components/item/item.ios.scss#L166-L176

@brandyscarney brandyscarney self-assigned this Mar 30, 2016
@brandyscarney brandyscarney added v2 help wanted a good issue for the community labels Mar 30, 2016
@brandyscarney brandyscarney added this to the 2.0.0-beta.8 milestone Mar 30, 2016
@alexbainbridge
Copy link

Can you please make it an option for IOS also?

e.g. a button with ion-item class always has arrow-right, would be nice to be able to turn that off

@brandyscarney
Copy link
Member Author

@alexbainbridge You can add the detail-none attribute to the item to hide the arrow, but I will also add it as an option in the Sass. 😄

@tejit2004
Copy link

Hi @brandyscarney, Any updates on the issue? Also I want arrow-up and arrow-down for list header, so that can be toggle by clicking upon. Is that on development?

brandyscarney added a commit that referenced this issue Jun 8, 2016
The following Sass variables control this:

```
$item-ios-detail-push-show
$item-md-detail-push-show
$item-wp-detail-push-show
```

ios is set to true by default, the others are set to false.

references #5993
brandyscarney added a commit that referenced this issue Jun 8, 2016
added the sass variable for the color directly to the svg instead. This
will help with future themes since the mixin was just being copied over.

references #5993
brandyscarney added a commit that referenced this issue Jun 9, 2016
adds more usage examples and content projection information.

closes ionic-team/ionic-site#579
references #5993
@brandyscarney
Copy link
Member Author

Thanks for the issue! This is now possible by setting the following Sass variables to true:

$item-md-detail-push-show 
$item-wp-detail-push-show
$item-ios-detail-push-show

By default, $item-ios-detail-push-show is already set to true and the others are set to false. Setting these variables to true essentially enables the arrow including adding it via the detail-push attribute.

I updated the item documentation to include this: http://ionicframework.com/docs/v2/api/components/item/Item/#detail-arrows

This will be in the beta 9 release, but if you want to try it sooner I have created a nightly release:

npm install --save [email protected]

@leonardopaiva
Copy link

Hello, isnt working here:

My code
sass variables, app/app.scss:

$item-md-detail-push-show : true;
$item-wp-detail-push-show: true;
$item-ios-detail-push-show: true;

view code showing the detail-push application:

<ion-list>
      <button ion-item detail-push *ngFor="let work of about.works" (click)="presentModalWorks(work)">
        <ion-avatar item-start>
          <img [src]="work.images.avatar">
        </ion-avatar>
        <p>{{ work.title }}</p>
      </button>
    </ion-list>

detail-none works as expected, but detail-push dont, thanks for your attention.

@kensodemann
Copy link
Member

Try moving this to the theme/variables.scss file:

$item-md-detail-push-show : true;
$item-wp-detail-push-show: true;
$item-ios-detail-push-show: true;

See the theming docs for details.

As a side note, you shouldn't need detail-push on a button with ion-item per the detail arrows docs, but I don't think it is doing you any harm either.

@leonardopaiva
Copy link

leonardopaiva commented Sep 20, 2017

thanks @kensodemann i moved to theme/variables.scss and now is working, it was my mistake i should have tried in the theme/variables.scss first. Even if it`s something obvious, others can make mistakes too. It might be a good idea to make it clear in the documentation that the variables need to be on the theme/variables.scss.

About

"As a side note, you shouldn't need detail-push on a button with ion-item per the detail arrows docs, but I don't think it is doing you any harm either."

I need it because in android/desktop the arrow will not show, that`s because of the material design guideline, but i dont like that, i want to make clear to the user that he can navigate there.

thanks again! you saved me, i would not want to have to do a workaround because of that.

@kensodemann
Copy link
Member

WRT the docs, we have this in the template app/app.sccs

// Shared Sass variables, which can be used to adjust Ionic's
// default Sass variables, belong in "theme/variables.scss".

Granted, if you are like me and delete the template comments after the first time you read them and then totally forget about them, then that won't do you any good, but they are there when the app is first generated anyhow. :)

Glad to hear it is working for you!

@leonardopaiva
Copy link

haha you are right, i will stop deleting some template comments, thanks.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 2, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted a good issue for the community
Projects
None yet
Development

No branches or pull requests

7 participants