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

feat: create UI library module #118

Closed
wants to merge 15 commits into from

Conversation

AliYusuf95
Copy link

@AliYusuf95 AliYusuf95 commented Mar 3, 2022

Solve #117

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

@or-else
Copy link
Contributor

or-else commented Mar 3, 2022

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...).

@AliYusuf95
Copy link
Author

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

@or-else
Copy link
Contributor

or-else commented Mar 4, 2022

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

@AliYusuf95
Copy link
Author

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?

@or-else
Copy link
Contributor

or-else commented Mar 4, 2022

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

@@ -26,7 +26,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
}

AlertDialog.Builder builder = new AlertDialog.Builder(activity);
View dialog = View.inflate(activity, R.layout.dialog_about, null);
View dialog = View.inflate(activity, R.layout.tindroid_dialog_about, null);
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need for prefixes in the app. The prefixes should be used only in the libraries.

Copy link
Author

Choose a reason for hiding this comment

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

That's right, I did this just to make the search/replace easier for me.
I'll remove the prefix once I have finish.

@AliYusuf95
Copy link
Author

@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

@or-else
Copy link
Contributor

or-else commented Mar 9, 2022

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.

@AliYusuf95
Copy link
Author

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.

@or-else
Copy link
Contributor

or-else commented Mar 9, 2022

Great, we agree.

I would start with creating components for message bubbles.

@or-else
Copy link
Contributor

or-else commented Mar 9, 2022

Then contact display.

@or-else
Copy link
Contributor

or-else commented May 20, 2022

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

@AliYusuf95
Copy link
Author

@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.

@or-else
Copy link
Contributor

or-else commented May 20, 2022

Thanks for the update.

@AliYusuf95
Copy link
Author

@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.

@or-else
Copy link
Contributor

or-else commented Jan 17, 2023

Is this still relevant?

@or-else or-else closed this Jan 31, 2023
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.

2 participants