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
feat: show project preview #43967
feat: show project preview #43967
Conversation
👀 Review this PR in a CodeSee Review Map |
So there are a couple of challenges with displaying the projects inside a modal.
|
Yes - absolutely. |
Aren't they all responsive? They have to be shown in the preview pane and that's something that the user controls.
Do you mean the 'Noticable Editor' animation? Yep, I'll track that in the issue. |
02b2ee3
to
d56e016
Compare
I rebased this, fixed the conflicts, and made the modal bigger - I hope you don't mind @ojeytonwilliams. I'm not sure if we want to try and get it in like this or add that animation @ahmadabdolsaheb mentioned to focus users attention. Is there any part of that done? Mocks or anything? I could try and come up with something if needed. I vote to do it on another PR, but either way works. |
Not at all, thanks Tom. I vote for handling those other features in another PR, too. |
@moT01, nice touch with adjusting the height. I is very likely that users will initially develop the projects with the preview in a horizontal frame. On the other hand, I think we should keep the width to the standard modal with that we use elsewhere; otherwise the buttons are going to get stretched too much. Here is a preview: Notice the white line on the bottom of the preview: Here is Tom's downtown :) One of the lines is associated with the margin we set in builders I have not figured out the bottom one :) Finally, a loader might be a nice touch. But that could wait. |
I'll look into those margins.
I'm not sure what you mean by this.
I'm in favor of that - I'll see what it looks like on a project with scroll bars.
I'm not against this - but we're trying to display a whole web page, some extra room might be nice. |
I did some things to fix up @ahmadabdolsaheb's suggestions. One of the issues was due to an 8px margin we add to all the previews. I added a second template, specific for the demo previews, that doesn't include the margin (see my last commit). I think we could use a little discussion on it. Some options:
Some pros and cons: Option 1: Option 2: Option 3: I would appreciate your thoughts on this @nhcarrigan & @ShaunSHamilton Side note - I believe these projects are missing solutions on the last step so the modal doesn't show up: Probably something for another PR. |
Honestly, if we could rig it up so that their project opens in a new tab I think that would be ideal.
I will open a PR to fix this today. 🙂 I think going with option 1 is the best - two templates is not ideal, but if it produces the best end result then 🤷🏻 |
As for the margin, I believe this falls under the same discussion about whether we keep using * {
margin: 0;
padding: 0;
} Which My Current Thinking
@nhcarrigan There is a PR, we should handle first: #43971 - same idea |
If challenges/projects look slightly different on different browsers, that's fine, I think. We want it to feel as real as possible.
That's my thinking, too. That's what I did in #42195 |
…inished projects" This reverts commit 0db11a0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't review my own PRs, but I'm happy with Tom's changes.
Nevermind - helps if I do a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot say I fully followed the framer.js
logic, but this appears to be working.
Otherwise, I worry about my personal confusion between the preview and the practice project preview - might be something I get over.
client/src/templates/Challenges/components/project-preview-modal.tsx
Outdated
Show resolved
Hide resolved
client/src/templates/Challenges/components/project-preview-modal.tsx
Outdated
Show resolved
Hide resolved
client/src/templates/Challenges/components/project-preview-modal.tsx
Outdated
Show resolved
Hide resolved
client/src/templates/Challenges/components/project-preview-modal.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This is LGMT if we are fine with removing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this.
Shows a modal which previews the solution to the final step of a practice project.
Not all practice projects have solutions, yet, and so the modal doesn't appear for registration-form. Once they all do we should lock that down with a test.
@ahmadabdolsaheb if you've got a chance, could you look at smartening up the Modal? It... works, but it's not pretty.
@raisedadead since this is an upcoming feature, I disabled the tests with
SHOW_UPCOMING_CHANGES
so we can run them locally when we want and then in CI when we're ready. Does that seem reasonable?