Add "STL Download" to project profile page #585

Merged
smartin015 merged 2 commits from project_profile_stl_download into main 2022-01-10 20:48:20 +01:00
smartin015 commented 2021-12-29 01:11:03 +01:00 (Migrated from github.com)

Closes #584

Extras:

  • Clarified in CONTRIBUTING.md about a missing env var I ran into (running on Ubuntu 20.04, brand new postgres installation)
  • Moved the EditorMenu STL download helper to src/helpers/so the import is more sensical when using it in a different component
  • Added the document-download icon from https://heroicons.com/ to Svg.tsx to make the button look fancy

Demo:

Screenshot from 2021-12-28 18-59-53

Tested by clicking the button and receiving a file. I didn't see any available unit test infra, so please LMK if I'm missing any and I'll add it.

Closes #584 Extras: * Clarified in CONTRIBUTING.md about a missing env var I ran into (running on Ubuntu 20.04, brand new postgres installation) * Moved the EditorMenu STL download helper to `src/helpers/`so the import is more sensical when using it in a different component * Added the `document-download` icon from https://heroicons.com/ to `Svg.tsx` to make the button look fancy Demo: ![Screenshot from 2021-12-28 18-59-53](https://user-images.githubusercontent.com/607666/147616002-adf87866-5508-49e8-9db5-e70672eebd82.png) Tested by clicking the button and receiving a file. I didn't see any available unit test infra, so please LMK if I'm missing any and I'll add it.
Irev-Dev commented 2022-01-07 22:59:04 +01:00 (Migrated from github.com)

This is a great idea and one we've considered adding before, and the PR is well implemented 👏

It's just the stl downloads is one of the more buggy parts of the app, it should get better with some backend changing I'm trying to do but I'm on the fence at to whether this should be added or not now.

While we're talking about it, @franknoirot if we were to add it. Where on the page do you think it should be? do you think it's current placement mixed in with the metadata is okay?

This is a great idea and one we've considered adding before, and the PR is well implemented 👏 It's just the stl downloads is one of the more buggy parts of the app, it should get better with some backend changing I'm trying to do but I'm on the fence at to whether this should be added or not now. While we're talking about it, @franknoirot if we were to add it. Where on the page do you think it should be? do you think it's current placement mixed in with the metadata is okay?
franknoirot commented 2022-01-08 22:16:31 +01:00 (Migrated from github.com)

Hey thanks so much for this @smartin015, great work!

The point that @Irev-Dev mentioned above is my only concern. Is there any way you could do just a couple design-based tweaks to this? Here's what I've mocked up in Figma (link to the frame is here):

  1. Align the download button to the right. Might require some flexbox stuff, I would prefer flex: wrap and using flex-grow on the "built with" content so that if for some reason they get squeezed on smaller screens the download button can wrap to the next line.
  2. Use the pink button styling that is found in the Comment button lower in this section or the Editor button in the IdeHeader component, including the button background and icon.

PR-585 Download Button Placement

Hey thanks so much for this @smartin015, great work! The point that @Irev-Dev mentioned above is my only concern. Is there any way you could do just a couple design-based tweaks to this? Here's what I've mocked up in Figma ([link to the frame is here](https://www.figma.com/file/VUh53RdncjZ7NuFYj0RGB9/CadHub?node-id=2410%3A7020)): 1. Align the download button to the right. Might require some flexbox stuff, I would prefer `flex: wrap` and using `flex-grow` on the "built with" content so that if for some reason they get squeezed on smaller screens the download button can wrap to the next line. 2. Use the pink button styling that is found in the Comment button lower in this section or the Editor button in the `IdeHeader` component, including the button background and icon. ![PR-585 Download Button Placement](https://user-images.githubusercontent.com/23481541/148660095-e9106775-739e-417c-83df-b3b9c508098f.jpg)
smartin015 commented 2022-01-09 18:54:01 +01:00 (Migrated from github.com)

How's this?

Peek 2022-01-09 12-53

How's this? ![Peek 2022-01-09 12-53](https://user-images.githubusercontent.com/607666/148694243-371cec01-dd82-40f0-a649-a66aa74a3b9f.gif)
franknoirot commented 2022-01-09 23:18:52 +01:00 (Migrated from github.com)

Yo I love it! I can take review @Irev-Dev, try it out across packages.

Yo I love it! I can take review @Irev-Dev, try it out across packages.
franknoirot (Migrated from github.com) approved these changes 2022-01-10 01:02:15 +01:00
franknoirot (Migrated from github.com) left a comment

I like your approach @smartin015 , way to go getting acclimated with the workflow in here 🚀.

Just a note to @Irev-Dev that the download button doesn't work for Curv models (I tried the default starter), but the model doesn't seem to load in the viewer either when viewing the part profile, so I don't think that should hold up this enhancement for the other packages.

I like your approach @smartin015 , way to go getting acclimated with the workflow in here 🚀. Just a note to @Irev-Dev that the download button doesn't work for Curv models (I tried the default starter), but the model doesn't seem to load in the viewer either when viewing the part profile, so I don't think that should hold up this enhancement for the other packages.
Irev-Dev commented 2022-01-10 20:48:13 +01:00 (Migrated from github.com)

Awesome, thanks again @smartin015, and thanks for reviewing @franknoirot.

Curv download is working for me @franknoirot, what browser are you using?

Awesome, thanks again @smartin015, and thanks for reviewing @franknoirot. Curv download is working for me @franknoirot, what browser are you using?
franknoirot commented 2022-01-10 20:51:02 +01:00 (Migrated from github.com)

Weird @Irev-Dev, I was using Chrome on MacOS last night when I tried it 🤷, glad it's working though.

Weird @Irev-Dev, I was using Chrome on MacOS last night when I tried it 🤷, glad it's working though.
Irev-Dev commented 2022-01-10 20:57:00 +01:00 (Migrated from github.com)

:/

:/
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#585