tindroid icon indicating copy to clipboard operation
tindroid copied to clipboard

feat: create UI library module

Open AliYusuf95 opened this issue 2 years ago • 14 comments

Solve #117

  • [x] Create UI library module
  • [x] Prefix resources used in UI
  • [x] Use the module in the app

AliYusuf95 avatar Mar 03 '22 15:03 AliYusuf95

I would suggest a more unique name for the library, such as co.tinode.tindroidui. There is certainly no need for an additional namespace android in the name of the module (co.tinode.android...).

or-else avatar Mar 03 '22 16:03 or-else

That's fine @or-else What about resources prefix should I use tindroid_ui_ or tindroidui_.

AliYusuf95 avatar Mar 04 '22 16:03 AliYusuf95

How about naming everything tinui: co.tinode.tinui and tinui_? It's short, unique (no such modules exist at maven). What do you think?

or-else avatar Mar 04 '22 17:03 or-else

I think it's good. By the way I prefer that the UI module naming should be similar to the SDK module; to be more convenient for the users. In this case the SDK module would be tinsdk?

AliYusuf95 avatar Mar 04 '22 21:03 AliYusuf95

co.tinode.tinsdk: yes, I like it.

or-else avatar Mar 04 '22 21:03 or-else

@or-else Currently a lot of features are tightly coupled with the application like (Contacts sync, Chats lists, Messages, etc.) We need to have a list of features that should be in the UI module and the rest can be considered either plugins or as application customization.

Currently this is what my mind for UI:

  • [ ] Chats lists
  • [ ] Messages
  • [ ] Images preview
  • [ ] Attachments

AliYusuf95 avatar Mar 09 '22 14:03 AliYusuf95

I'm not concerned with the app being tightly coupled with the SDK and UI libraries. I do not foresee a case where I would want to swap this UI library for another in the app. So, the app is not of concern, the tinui is.

Let's take a step back: what is the intended use case for the tinui? I imagine that the use case for it is to be usable as components when building another chat app, like tindroid. If so, there is no clear line between the app and the UI library. The library can start small, as a set of a few clearly separable components. We can gradually move components from the app to the lib over time.

or-else avatar Mar 09 '22 17:03 or-else

Exactly this is what I'm trying to achieve.

What I understand that not every component will add to tinui will be used right away in the app. So it doesn't have to contain all features that used in the app. Ideally over time the app will rely on tinui components. As you said this will give the freedom to gradually add more components to the lib.

AliYusuf95 avatar Mar 09 '22 18:03 AliYusuf95

Great, we agree.

I would start with creating components for message bubbles.

or-else avatar Mar 09 '22 18:03 or-else

Then contact display.

or-else avatar Mar 09 '22 18:03 or-else

This PR seems to be getting stale. Should I close it?

or-else avatar May 20 '22 02:05 or-else

@or-else I was bit busy last month, but I made some progress creating some views and feed them from Tinode instance. I'll try to push finished parts by next week.

AliYusuf95 avatar May 20 '22 02:05 AliYusuf95

Thanks for the update.

or-else avatar May 20 '22 02:05 or-else

@or-else Currently, I'm overwhelmed with changing job process. I'll pause my work in this PR until I settle in the new job.

AliYusuf95 avatar Jun 28 '22 13:06 AliYusuf95

Is this still relevant?

or-else avatar Jan 17 '23 03:01 or-else