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

[v-play] add venue description implementation #65

Merged

Conversation

jmastr
Copy link
Collaborator

@jmastr jmastr commented Feb 19, 2017

No description provided.

Julian Vega added 5 commits February 19, 2017 12:32
Both, the Sailfish SDK and the v-play SDK, offer an IconButton
implementation. However, both implementations differ, so that we need to
wrap around that.

The function 'iconBy(type)' returns the framework specific
implementation.

Ref #48
The design is far away from being perfect on v-play, but it is a good
starting point for further development.

Ref #48
Therefore we connect the Sailfish's clicked(int index) signal with the
selected(int index) signal of v-play's SimpleRow and we pass through
Sailfish's PageStack to v-play's NavigationStack.

Drawback: This commit introduces some type error, which we have to
address in the future.

Ref #48
import "." as BVApp

IconButton {
function iconBy(type) {
Copy link
Owner

@micuintus micuintus Feb 19, 2017

Choose a reason for hiding this comment

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

That IconButton abstraction is amazing, nice! I have also already thought about this a bit (when thinking about the Theme), and I head exactly something like this in mind ;). Of course, I haven't implemented it / tried it out. Very nice work!

One idea: What would you think about moving this iconBy() function to the Theme class? Maybe we could do sth. like

Theme
{
...
  function icon(type, scale)
...
}

I see the following advantages with that approach:

  1. We don't have provide a wrapper for the IconButton implementation.
  2. We can use this function outside of the IconButton use case, when we need icons with native look and feel.

Copy link
Collaborator Author

@jmastr jmastr Feb 19, 2017

Choose a reason for hiding this comment

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

Thanks. I think it's a good idea to move it into the Themes, but shall the function then return an array with [iconString, scalingFactor] or what did you think of?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd suggest just to move the functions iconBy(type) into the according Themes and set the scaling factor from the outside, as it is now already.

Copy link
Owner

Choose a reason for hiding this comment

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

My idea was that it actually returns the icon type that is used on the corresponding platform: A string on v-play and a (scaled) icon on Sailfish, which both can be directly assigned to the icon object of the IconButton. But I just saw that we then need to export the pressed property as a parameter of this function, as well, right? Does v-play have sth. like this? I assume yes, and I assume it is named differently. ;)

Copy link
Collaborator Author

@jmastr jmastr Feb 19, 2017

Choose a reason for hiding this comment

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

They have something how the icon should look like AFTER it was pressed (what we actually need for the upcoming favourites feature), but not for the pressed state itself.

I am not quite sure, what you want to achieve. So I'd suggest to move the function as it is, so it is at the right place and to postpone further improvements. I have to think about the whole VenueDetails-design anyways.

Ok?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, I was wrong, I think pressed is called selected in v-play...

Copy link
Owner

@micuintus micuintus Feb 19, 2017

Choose a reason for hiding this comment

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

OK. Lets do it scrummy-iteratively step by step. (I still steer towards removing the IconButton abtraction in a later step ;))

@micuintus
Copy link
Owner

OMG, that already looks sooooo nice. I am really impressed!

That way we can get icons from other places in the source code as well.
In the long run, we could even get rid of the IconButton wrapper, if we
return the whole IconButton object via the iconBy() function and not
only the icon string.

Ref #48
@micuintus
Copy link
Owner

I'd see one alternative option: Only (re)implementing an IconButton in Silica4v-play with a selected property and use the icon function suggested above.

Anyway, we currently use a hybrid between the approaches of #62 and #56.
Lets find out where the journey leads us to ;).

@micuintus micuintus closed this Feb 19, 2017
@micuintus micuintus reopened this Feb 19, 2017
@micuintus micuintus merged commit df0d904 into development Feb 19, 2017
@micuintus micuintus deleted the jmastr/v_play_add_venue_description_implementation branch February 19, 2017 15:43
@jmastr
Copy link
Collaborator Author

jmastr commented Feb 19, 2017

But I would at least need an Silica implementation to "fake" the type property...

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