Telegram X for Android Competition, Round 2
This contest features three separate tasks evaluated independently from each other. Developers are highly recommended to focus on a single task to achieve the highest quality, but entries that include two or more features will also be accepted. In each task, only one winning entry will be rewarded for each feature.
Contestants can choose to implement one of the following features: Channel Comments + Message Threads, the ‘Send As’ feature, and Improved Search. Entries must be submitted as ready-to-merge pull requests to the Telegram X Repository by the deadline date. It is highly recommended to submit separate tasks as separate pull requests.
Please note that reusing existing code for these features from other Telegram apps is prohibited. These features must be built in Java, without relying on third-party frameworks, and keeping full consistency with the existing TgX codebase and the provided design mockups:
Resources
- The archive containing all the mockups and visualizations is here. For Figma, follow this link.
- Telegram X for Android GitHub Repository – Quick Setup for Development.
The Contest Task
1. Channel Comments + Message Threads
Implement viewing and sending comments in channels where this feature is enabled. Threads for group messages must also be included. For resources, refer to the folders ’Comments’
and ’Threads’
in the provided archive. While building your entry, you may notice an unfinished implementation in the existing source code. Since most of it is unfinished and won’t help you complete the task effectively, it is suggested that you fully delete it and start from scratch. However, you are allowed to reuse any of the properly designed parts. Most of the source code may be found and deleted by looking for Config.COMMENTS_SUPPORTED
variable usages. Your implementation must contain:
1.1 Channel Comments:
- Proper Layout - All message entities (text, media, stickers, etc.) must be properly supported to render the comments entry point in accordance with the design and animations provided for both Flat and Bubble modes. Your implementation must consider scenarios where channel reactions are enabled and the media has a caption.
- Comment Interactions - The message entity must display the bar with an auto-updating comment counter below it, including the 3 profile pictures of the users who most recently commented on the right side of the bar. When opening the channel post’s context menu, a button to open the discussion group must be present. If someone replies to a user’s comment, the counter should indicate this by showing a dot on the comments bar. When you press and hold the bar, a separate layer to preview the comments must appear. When no comments have been left yet, the ’Leave a Comment’ button is shown.
- Admin View - Chat owners and moderators can manage the discussion group by pressing ⋮ on the header inside comments (while regular users can only open the group).
- General Logic - Chat position logic when opening comments must be identical to the existing areas of the app, except when comments are opened for the first time – in which case the app should take the user to the very first message.
1.2 Threads:
- Displaying Threads - Once a message becomes a thread, an arrow indicator with the reply counter should be rendered on the left of the message timestamp. The counter should automatically update its value with messages as they are added or removed.
- Interacting With Threads - The core message and replies have a ’View X Replies’ button, which takes the user to the thread. The thread should have a pinned starting message inside it and a counter of total replies appears on the header.
1.3 Bonus Task:
- Improved Preview Animation - Previewing the comments section by holding a message’s comment bar should use a special opening animation that can be found in the
’Video’
folder. Reusing this for other applicable places (holding a chat in the chat list, search results, groups in common, etc.) is considered a bonus task, which may offer additional rewards, assuming all other parts of the task are also finished.
2. ‘Send As’
Implement sending messages in public groups (also comments and discussion groups) either as a channel that the user owns, or as an anonymous admin entity. For resources, refer to the folder ’Send As’
in the provided archive.
- Appearance - The app should make it clear which account will be used when sending a message. In chats that allow switching to a non-default identity, the app should move the camera button to the attachment menu, and display a button to switch the identity. A 2nd line including the selected identity should be shown below the message placeholder whenever the input field is not in focus (cursor is not visible). In the share menu and other places, the app should clearly show an icon or avatar and allow for switching identities using the existing menu, shown by holding the button.
- Personal Account Protection – For certain actions that require revealing a personal account (despite having anonymous admin rights or having a chat identity selected), the app should introduce a simple double-tap protection. When a user taps to cause a certain action, a special built-in tooltip with “This action requires revealing your personal account. Tap again to confirm.” should be shown. If the user taps again to confirm the action while this tooltip is visible, it should be immediately hidden and the action performed. This includes, but is not limited to: participating in polls with visible votes, choosing a reaction in the message menu, and starting a game.
- Quick Switch – The app should allow for quickly changing the currently selected entity either by tapping or by holding and swiping up the identity switch button.
- Other Features – The app should remember the entity used for a specific chat and display it by placing an icon of the anonymous admin entity or the channel profile picture when the user sends something via the inline sharing menu or chat preview.
3. Improved Search
Implement filters when using search. For resources, refer to the folder ’Search’
in the provided archive.
- Filtering – The app should introduce filtering to select messages from specific users or by the message type (text, photo, file, etc). When a text query is present, only applicable filters should be shown.
- Highlighting – The app should introduce highlighting of search queries by using the result of the
org.thunderdog.challegram.util.text.Highlight.valueOf
method applied to the relevant message parts (text, caption, link preview fields, etc). - Improved Global Search – When tapping on a message result in global search from the main screen, the application should open the chat with the found message on-screen and a fully initialized in-chat search UI, allowing the user to switch between in-chat and global search without retyping the search query.
- Improved Search Results from Specific Users – When selecting the ‘Messages from…’ option via the member list and the message menu (in the ‘More…’ section), the app should use the new improved interface, allowing for filtering or entering a text query, maintaining consistent search behavior.
Questions, concerns and more
For further clarification or requests regarding the contest task, please refer to the official Telegram X: Developers group. It is recommended for participants to join it, in order to not miss any further clarifications or additional mockups that may be provided for ongoing contest tasks.