Bug 434332 - Add a placeholder text to search text field
Summary: Add a placeholder text to search text field
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Recommenders (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2014-05-07 10:23 EDT by Johannes Dorn CLA
Modified: 2019-07-24 14:36 EDT (History)
3 users (show)

See Also:


Attachments
Search box Placeholder (13.95 KB, image/png)
2014-07-17 14:25 EDT, Madhuranga Lakjeewa CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Dorn CLA 2014-05-07 10:23:02 EDT
This should be a placeholder text like "Snipmatch" or "Snipmatch search" that is styled differently and automatically removed once the user starts typing.

Unfortunately, the StyledText component we use here doesn't have the setMessage() method that a normal SWT text field defines for just that use case. We would have to implement this functionality on our own.
Comment 1 Marcel Bruch CLA 2014-05-07 11:12:18 EDT
I'm not sure why we used a styled text widget at all. Can we replace it by a simple text widget instead?
Comment 2 Johannes Dorn CLA 2014-05-07 11:35:29 EDT
Look at this gerrit change: https://git.eclipse.org/r/#/c/26148/
This changes the StyledText to a Text and sets a placeholder message.

There are at least two issues with this change which i discussed there.

Marcel: What's the priority for this one?
Comment 3 Madhuranga Lakjeewa CLA 2014-07-17 14:25:27 EDT
Created attachment 245167 [details]
Search box Placeholder

Are you expecting something like this?
Since StyledText doesn't have a functionality like that, we should implant an our own way like Johannes's change. Anyway, what is the status of this change now?
Comment 4 Andreas Sewe CLA 2014-07-18 02:59:12 EDT
(In reply to Madhuranga Lakjeewa from comment #3)
> Created attachment 245167 [details]
> Search box Placeholder
> 
> Are you expecting something like this?

Yes, that looks like what we imagined.

> Since StyledText doesn't have a functionality like that, we should implant
> an our own way like Johannes's change. Anyway, what is the status of this
> change now?

It's up for grabs, i.e., it would be great to have this implemented, but Johannes or I won't be able to do it. So, if you would like to give it a try, please go ahead. We would be happy to review your contribution in Gerrit then.
Comment 5 Madhuranga Lakjeewa CLA 2014-11-01 13:44:19 EDT
I pushed a patch on grrit[1].

[1] https://git.eclipse.org/r/#/c/35773/