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

Add support for displaying custom profile field data #2900

Closed
timabbott opened this issue Aug 17, 2018 · 10 comments · Fixed by #5398
Closed

Add support for displaying custom profile field data #2900

timabbott opened this issue Aug 17, 2018 · 10 comments · Fixed by #5398
Assignees
Labels
P1 high-priority server release goal Things we should try to coordinate with a major Zulip Server release. webapp parity Features that exist in the webapp that we need to port to mobile. We aren't aiming for full parity.

Comments

@timabbott
Copy link
Member

We recently added support for custom profile fields in the Zulip server and webapp, and we should probably plan to add support for that on mobile as well.

I don't think we need to care about editing custom profile fields on mobile (it's a lot of work for not that much benefit), but we should probably have a way to see them when you get full-screen data about another user (where we show name/email/large avatar/etc.).

show_user_profile in static/js/popovers.js has the logic for rendering these data in the webapp.

@nanohayder
Copy link

is there any update about this it will greatly help us

@gnprice
Copy link
Member

gnprice commented Apr 24, 2020

@nanohayder I would be curious to hear more about why this would greatly help you! Either here, or a conversation might be easier on Zulip -- come say hello in #mobile on chat.zulip.org.

@timabbott Is there API documentation somewhere on how to interpret custom profile fields? There's an example now on https://zulipchat.com/api/get-all-users , which helps some, but the data there is pretty abstract. I imagine the table of what each numbered field means is somewhere on the /register response; we'll want some documentation of how that interface works in order for someone to efficiently implement this feature correctly.

@timabbott
Copy link
Member Author

Nope; that's in my view the main TODO for the "users" part of the API documentation. I expect we'll add it when we add documentation for the endpoints for custom profile fields more generally, which will at least provide other details we can reference for more details from a link. I imagine @akashaviator will do it at some point in the next few weeks.

@timabbott
Copy link
Member Author

But some brief notes:

  • In this block, the 1 is the field ID, and the content is this user's value.
                "1": {
                    "rendered_value": "<p>+0-11-23-456-7890</p>",
                    "value": "+0-11-23-456-7890"
                },
  • The mapping from field ID to what the field actually is (it's title, hint, and type) lives in the custom_profile_fields section of the /register response.
  • The field types are described in custom_profile_field_types, mainly for UI purposes.
  • The CustomProfileField definition is the best resource of what the 7 supported field types mean.
  • get_custom_profile_field_data in static/js/popovers.js is a block for parsing these that we may want to turn into shared code.

@gnprice
Copy link
Member

gnprice commented Apr 25, 2020

Cool, thanks -- that's helpful for understanding the scope of it. Once that documentation is written, it looks like this should be a pretty straightforward task for someone to do.

Here's also the chat thread where @nanohayder discussed their use case:
https://chat.zulip.org/#narrow/stream/48-mobile/topic/Issue.20.232900/near/862453

@rk-for-zulip
Copy link
Contributor

For reference, the relevant (meta-)issue on the server-side is zulip/zulip#10134.

@gnprice
Copy link
Member

gnprice commented May 4, 2020

zulip/zulip#10134

That looks to be about a specific additional feature, which isn't complete.

Custom profile fields in general are this feature:
https://zulipchat.com/help/add-custom-profile-fields

@carlinmack
Copy link

carlinmack commented Nov 26, 2021

This would greatly help our organisation where we have a custom field for pronouns (necessary for referring to people). Also, showing emails on mobile (maybe just missing from android? It only says when they were last active) would be very helpful as we have many members with the same name and sadly they haven't set a picture.

@chrisbobbe chrisbobbe added P1 high-priority server release goal Things we should try to coordinate with a major Zulip Server release. labels May 20, 2022
@chrisbobbe
Copy link
Contributor

See #5363 for giving privileged placement to certain "selected" fields.

@chrisbobbe chrisbobbe added the webapp parity Features that exist in the webapp that we need to port to mobile. We aren't aiming for full parity. label May 20, 2022
@gnprice
Copy link
Member

gnprice commented May 21, 2022

Chat thread about the remaining open questions in this API.

gnprice added a commit to gnprice/zulip-mobile that referenced this issue Jun 3, 2022
gnprice added a commit to gnprice/zulip-mobile that referenced this issue Jun 7, 2022
gnprice added a commit to gnprice/zulip-mobile that referenced this issue Jun 7, 2022
chrisbobbe pushed a commit to gnprice/zulip-mobile that referenced this issue Jun 8, 2022
@gnprice gnprice closed this as completed in 0a10831 Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 high-priority server release goal Things we should try to coordinate with a major Zulip Server release. webapp parity Features that exist in the webapp that we need to port to mobile. We aren't aiming for full parity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants