[GCompris-devel] Search feature

Johnny Jazeix jazeix at gmail.com
Wed Jan 13 09:28:49 UTC 2016


Hi, you can do it in Menu.qml (I give you one global idea, feel free
to do it like you want):
adding a section is done by adding a new value to the sections
variant. It should automatically be displayed in the section list.
Then, you can add the TextField with visible: tag="yourtag".
You can anchor the top of the TextField to the sectionBar.bottom and
anchor the top of the grid with activities to the TextField if we are
in horizontalMode (in vertical mode you have to put undefined for the
top, using ternary operator probably).
If you want someoverlap of the TextField on the section grid, you have
some properties in the anchors (horizontalAnchorsOffset or something
like that http://doc.qt.io/qt-5/qml-qtquick-item.html#anchors-prop).
Be careful to check if it works when resizing.

Also what do we do about other filters in search case? For the paying
and non-enabled activities, I think we should not display them (so
apply the filter first) but for the difficulty?

For the TextField, you should probably force the font to the one used
in GCText (I don't remember the exact code to do it but it's not a big
issue) and on tablet, the keyboard should pop up.

Johnny

2016-01-13 7:51 GMT+01:00 RISHABH GUPTA <rishabh9511 at gmail.com>:
>
>
> On Tue, Jan 12, 2016 at 5:00 PM, Johnny Jazeix <jazeix at gmail.com> wrote:
>>
>> Hi,
>>
>> 2016-01-12 11:54 GMT+01:00 Bruno Coudoin <bruno.coudoin at gcompris.net>:
>> >
>> >
>> > Le 12/01/2016 10:39, Holger Kaelberer a écrit :
>> >
>> >> Me too.
>> >>
>> >> Users (also the adult ones) tend to not read documentation and imho a
>> >> "search" feature is useful enough to keep it visible. If we opt for
>> >> the section header it could still be put at the right/lower of the
>> >> list.
>> > I agree the search feature is useful but not for all our user. More, for
>> > the smaller one they will enter it and get lost. At least this new
>> > search button should not be there by default, better let the advanced
>> > users search a little bit for the option than confusing the new ones
>> > with an advanced feature.
>>
>> One advantage of having it as a section is that when no search is
>> entered, all the activities are displayed. For now, the user has to
>> navigate to find the good section.
>> I agree with putting it at the end of the list.
>>
>>
>> We can also think to add an "advanced mode" in conf where we can add
>> things that won't be used by children but by developers/parents.
>>
>> >>
>> >>>>
>> >>>>     Maybe we can put
>> >>>>     it on the section bar, with a setting to display it or not
>> >>>> (false by
>> >>>>     default)?
>> >>
>> >> I don't like the bar option because imho it does not belong there.
>> >> Activity selection is controlled via the section header and
>> >> preselecting activities via a search feature is part of this task as
>> >> is categorial grouping and personal favorites.
>> > Here the suggestion was to use the 'section bar' so you agree. I also
>> > back you, I don't like much using the control bar for that.
>> >>
>> >>>>
>> >>>>     For the sections on top, it is a list, so it should resize
>> >>>>     automatically if we add one more.
>> >>
>> >> +1
>> >>
>> >> Add a magnifier icon (or so) to the section list and present a
>> >> TextInput (or so) onClicked, either replacing the section bar (in
>> >> landscape) or, maybe more generic, overlaying it on top of the whole
>> >> scene.
>> > I agree on that but more complex, in portrait mode the search bar should
>> > be on top anyway.
>>
>> Yes, having the search bar on top in both case.
>
>
>  The activities  take up the area on top .How do we place it on the top ?
>
>
>>
>> >>
>> >>
>> >>>>
>> >>>> So my proposal:
>> >>>>
>> >>>> On desktop and mobile in landscape mode,we can place the icon on the
>> >>>> bottom next to configuration
>> >>>> icon ,since there is enough space ,on clicking it would expand to a
>> >>>> search bar .
>> >>>>
>> >>>>  For potrait mode  i like what bruno sir suggested .
>> >>>>
>> >>>> If anyone else has any other suggestion then please provide
>> >>>> them,would be a great help . :)
>> >>> Another idea, we improve the bar as to make the buttons shrink to
>> >>> suit the window width so it is not
>> >>> a problem to put the option even in portait mode.
>> >>>
>> > We can keep the idea of improving the control bar to make it suit the
>> > window width. But let's use the section bar to add the search button.
>> >
>>
>> For me, I consider it a bug that the buttons in configuration can
>> sometimes overlap the screen width. I didn't have time to dig it yet.
>>
>> Johnny
>>
>> > Idea, we could add a swipe gesture on the section bar to switch from
>> > section mode to search.
>> >
>> > Bruno.
>> > _______________________________________________
>> > GCompris-devel mailing list
>> > GCompris-devel at kde.org
>> > https://mail.kde.org/mailman/listinfo/gcompris-devel
>> _______________________________________________
>> GCompris-devel mailing list
>> GCompris-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/gcompris-devel
>
>


More information about the GCompris-devel mailing list