Open brtrick opened 3 years ago
Sorry for the delay! I believe I've finished editing my Front-end Routes.
Looks good. A couple comments:
:channel_id is still nested under :server_id. Is that necessary/useful?
a modal is a pop up that covers part of the page
ServerForm
, FieldForm
, and ChannelForm
should all be modals. I've renamed them from "overlay" to "modal".Also, I don't know if this is relevant but I've called CurrentUserForm an overlay (covers entire page) but don't currently plan on having it accessed by route to a different frontend url.
"ChannelIndex will properly show the correct messages according to server"
Unless channels have messages on different servers (which I believe would require more internal tracking than is currently in the design), then knowing the channel_id should be enough. All the messages on that channel will be for the server on which it appears. In other words, while a give channel will be associated with a specific server, once you have the channel_id, that channel_id is all you need to grab everything else associated with the channel.
"ChannelIndex will properly show the correct messages according to server"
"ChannelIndex will properly show the correct [channels] according to server".
This is why I said: "Otherwise I could add server_id as an additional field within textChannels in store state". I assume I would need server_id such that ServerIndex will know what text channels (and eventually voice channels) to display.
I assume I would need server_id such that ServerIndex will know what text channels (and eventually voice channels) to display.
Your state already has that info stored under the servers slice in the channel_ids field. You don't want to store info in more than one place (because then it could get out of sync).
So then does that mean that I should have the server_id accessible through the frontend url? (/channels/:serverId/:channelId) Because otherwise to get the serverId I would need to potentially iterate through all servers until I find the correct servers. Is that correct?
Ok, I think I understand where you are coming from. You're including the server_id in the route, not because you need it for the channel_id, but because you need a way to keep track of which server is active. That could work. Another possible solution to consider: storing the active server_id in session.
Thank you for the response! I think I'll stick with keeping the server_id in the route for now but if I run into any issues I'll keep in mind that I could store the active server_id in session.
I also wanted to ask about the encrypted credentials.yml file. I'm trying to include pictures with my users now but I wanted to ask if there is any concern with adding the credentials.ymc.enc file to my remote repository. I'm not certain of how the encryption works so I don't know if decrypting my keys is easy for malicious viewers. Should this be included in my .gitignore?
Good job with the front-end routes. A few comments/suggestions: