{"id":30,"date":"2022-02-16T22:30:30","date_gmt":"2022-02-16T22:30:30","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/michelleliu\/?p=30"},"modified":"2022-02-16T22:48:26","modified_gmt":"2022-02-16T22:48:26","slug":"learning-material-ui","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/michelleliu\/2022\/02\/16\/learning-material-ui\/","title":{"rendered":"Learning Material UI"},"content":{"rendered":"\n<p>As I continue to work on user profile pages, I start to wonder if there are things I can change on the frontend to improve user experience. Though I&#8217;ve completed the functionality to delete user profile on click of a button, I realized it might not be the best design because users might accidentally click on the delete button and permanently remove their account. That&#8217;s never a situation I want to get myself into so I&#8217;m researching on how to add a confirmation dialog. <\/p>\n\n\n\n<p>This StackOverflow seems (<a href=\"https:\/\/stackoverflow.com\/a\/52035267\">https:\/\/stackoverflow.com\/a\/52035267)<\/a> like an easy fix for the issue by using browsers default window to confirm user&#8217;s choice so I will definitely try that. I also found that Material UI library has a dialog component that can be used for confirmation purposes which is more aesthetically pleasing so I&#8217;m leaning more towards the Material UI approach.<\/p>\n\n\n\n<p>One other reason to learn Material UI is because it is very versatile and can be used to build the shelter management page that I&#8217;ll be working on shortly. The shelter management page lists out all pets from the signed in shelter and each pet is displayed in a block with its image, name, type, age, availability, along with a delete and an update button and I think the Grid component of MUI can definitely be utilized to achieve this. Its styling seems a lot easier than conventional CSS where you need to style all elements either by tag or class\/id. <\/p>\n\n\n\n<p>I&#8217;ve also discovered that MUI has a Pagination component that can be used to paginate pet list on the shelter management page. Although this is not on the initial prototype, I believe this would be a nice feature to add to the page so users don&#8217;t end up with a never ending list of animals they have to scroll through. I expect the number of animals for a shelter should be relatively low so the pagination logic can be implemented on the frontend to save some requests to the backend. <\/p>\n\n\n\n<p>Right now I&#8217;m focused on implementing basic functionalities so ensure we have a functioning application that meets the requirements. However, improving user experience is also one of my goals if time allows. I really want to try implementing pagination, search, and sort on the shelter management page. Hopefully I&#8217;ll get to all of them in the following weeks! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I continue to work on user profile pages, I start to wonder if there are things I can change on the frontend to improve user experience. Though I&#8217;ve completed the functionality to delete user profile on click of a &hellip; <a href=\"https:\/\/blogs.oregonstate.edu\/michelleliu\/2022\/02\/16\/learning-material-ui\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":12006,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/users\/12006"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":3,"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/posts\/30\/revisions\/33"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/michelleliu\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}