Pensano-dev / aura-mobile-app

5 stars 0 forks source link

feat: facility component #29

Closed siqbal181 closed 6 months ago

siqbal181 commented 6 months ago

I ran prettier and it pulled in a lot of weird index files on metro folder. Apologies just ignore those.

Actions

NB: Unsure where the styles should sit per page (if it should be in the styles folder.. but for now it is within the same page). Test setup is started but I've seen that there is a testing plan(!?) or something in place so I will hold off. Also the setup was annoying me so I might try another time soon

image
pablisch commented 6 months ago

Good point about the styles. We should establish some guidance on this. I noted that having a styles folder is a convention but how you have done it seems sensible too. I think for such a small component, I would personally want the StyleSheet defined in the FacilityComponent.js itself rather than in a separate file.

It seems odd to me to have 'Component' in the component name though.

siqbal181 commented 6 months ago

Good point about the styles. We should establish some guidance on this. I noted that having a styles folder is a convention but how you have done it seems sensible too. I think for such a small component, I would personally want the StyleSheet defined in the FacilityComponent.js itself rather than in a separate file.

It seems odd to me to have 'Component' in the component name though.

@pablisch Yeah I don't mind either way just as long as there's a consensus. I read on the projects that @junocchi is doing some best practice guide, so maybe how we position styles in separate files vs. same files could also be added.

RE components, happy to also remove.. it's just what I do at my workplace and just made it easier in a large codebase to spot a specific component vs. a function or something else. I guess we won't have such an issue! Feel free to make comments on the code and I'll resolve with changes

pablisch commented 6 months ago

@siqbal181 Interesting. I have never come across this before. Do all components have the 'Component' suffix? I can see the point but it feels like the extra length outweighs the benefit for myself unless it is a huge app. Be interesting to see if they do the same at Ju's. Let's leave it for now, see what people think and do it consistently one way or the other.

I noticed the individual component folder too which I have not been doing as I find all the directories really dull to work with but is good practice. I think we should do it as you have but again, we will bring up and make consistent.

siqbal181 commented 6 months ago

@siqbal181 Interesting. I have never come across this before. Do all components have the 'Component' suffix? I can see the point but it feels like the extra length outweighs the benefit for myself unless it is a huge app. Be interesting to see if they do the same at Ju's. Let's leave it for now, see what people think and do it consistently one way or the other.

I noticed the individual component folder too which I have not been doing as I find all the directories really dull to work with but is good practice. I think we should do it as you have but again, we will bring up and make consistent.

Yeah all the components do, but definitely can see the argument for overkill. RE the components having their folder, it just helped my brain segment the test/css/index file per component into one place and think its a bit more manageable?