-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Distinguish external from internal classes #1849
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
Comments
In terms of breaking change, I believe the "alternative" suggestion would not interfere with existing deployments but simply disallow the creation of classes that would conflict with an internal class. So if a deployment already has On the other hand, it is unintuitive to have to prefix internal classes with underscore, while they are displayed without underscore in the dashboard. We could also just display them in their original name in the dashboard. |
Maybe we could disallow the creation of User class and deprecate existing User classes for version 5 and then do the redirect for version 6. |
How would such a migration work for a live environment to migrate from Would we still store Just to say that, I guess the simplest way to address the original issue of seeing multiple |
We can go in this direction but maybe we should not allow the developers to create User and _User classes anymore. The ones that already have would continue working but we wouldn't allow it anymore for new users. |
We could do that, or maybe we should keep system class names and custom class names completely separate and not influence / restrict one another, which I think was the original reason why system classes start with an underscore. Because what happens if tomorrow a new feature introduces a system class Any new system class introduction could create significant migration issues for existing deployments. But allowing a I think any of these restrictions create the same problem:
So maybe the solution is to make a clear distinction for developers and say:
That means the only measure we would take from this is displaying system classes with either their real name (with underscore) in the dashboard or mark them visually differently in the dashboard, e.g. wrap them in a "System Class" group. |
@davimacedo If you are fine with it, I would transfer this issue to Parse Dashboard to solve this solely by displaying internal classes differently in the dashboard. |
Thanks for opening this issue!
|
@mtrezza I tried to experiment with grouping classes visually and for now, it seems like showing the real name would be the simplest solution: Would you accept a PR with such change? |
Sure, would you add a line to separate the internal classes, like in the screenshots in #1849 (comment)? I think it would be a helpful visual guide to faster identify internal classes. |
@mtrezza yes, the PR is ready, and here is how it looks: https://i.imgur.com/dzfhv7Z.png The only thing that I am not sure about is the separator API, there are a few ways of doing it, I chose the one that could be reused in other lists if needed. |
Looks perfect! I'll review. |
Closing via #1878 |
New Feature / Enhancement Checklist
Current Limitation
It is currently possible to create a class called User and a class called _User. Both show up in Parse Dashboard with the name User and it causes confusion for some users when using Parse Server for the first time.
In addition to that, it is very confusing when we have to use _User or User throughout the sdks, endpoints, etc.
Feature / Enhancement Description
I believe we should change Parse Server in such a way that User and _User point out to the same thing. So no matter if we send User, or _User, via the api, they will always refer to the _User class we currently have.
Example Use Case
Alternatives / Workarounds
An alternative could be simply disallow the developers to create a User class.
3rd Party References
The text was updated successfully, but these errors were encountered: