Skip to content
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

Fixes #8155 - improve the workflow during asset creation #10967

Merged
merged 2 commits into from
Jun 25, 2022

Conversation

veenone
Copy link
Contributor

@veenone veenone commented Apr 23, 2022

Description

I'm trying to help improving the workflow during asset creation by adjusting the layout ordering as mentioned in the original issue. I hope this implementation meets the needs of the request

Fixes #8155

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

the new layout has been tested by doing the following:

  • Test creating assets without optional fields filled
  • Test creating assets with optional fields filled

Test Configuration:

  • PHP version: 7.4.27
  • MySQL version : 10.4.22
  • Webserver version: Apache 2.4.52
  • OS version: Windows 10

Checklist:

Preview

some fields are moved and add 2 checkboxes which disabled by default
image

the content of each checkboxes group
image

custom fields location from model is now placed before the checkboxes also to give positional consistency during asset creation
image

Please inform me if this PR acceptable or not

- adding 2 options to hide optional information
@snipe
Copy link
Owner

snipe commented May 5, 2022

I'd think we'd need to set a cookie or add an admin setting for that though? It would be pretty annoying to have to hide them every time.

@veenone
Copy link
Contributor Author

veenone commented May 21, 2022

I'd think we'd need to set a cookie or add an admin setting for that though? It would be pretty annoying to have to hide them every time.

Hi @snipe, sorry I was away for vacation.
Thank you for your comment. I will try to implement either cookie / admin setting for it.
It seems like cookie would be easier to do though.. I will try to consider both approach then

@veenone
Copy link
Contributor Author

veenone commented Jun 1, 2022

hi @snipe ,

sorry for taking some time before I get back to my PC.
cookie has been implemented to keep the preference of the option of the user in the view.

Waiting for your feedback on the change

@snipe snipe requested a review from uberbrady June 1, 2022 06:09
@snipe
Copy link
Owner

snipe commented Jun 25, 2022

This looks great - needs a little styling love, but I can handle that part. Sorry for the delay on reviewing :)

@snipe snipe merged commit d70b367 into snipe:develop Jun 25, 2022
@snipe
Copy link
Owner

snipe commented Jun 25, 2022

What is flexCheckDefault? I can't see where that comes from?

@veenone
Copy link
Contributor Author

veenone commented Jun 27, 2022

Ah you're right, I made a mistake for this part.

I think it should be :

    <label class="col-md-3 control-label"></label> 
        <div class="col-md-2 col-sm-2 text-left form-check" style="z-index:1;">   

        <input class="form-check-input" type="checkbox" id="optional_info" name="options[]" value="optional" <?php if (!empty (json_decode(Cookie::get('optional_info')))) {if(in_array('optional',json_decode(Cookie::get('optional_info')))) {echo 'checked';} else {echo 'unchecked';}} else {echo 'unchecked';} ?>>
        <label class="form-check-label" for="flexCheckDefault">
        {{ trans('admin/hardware/form.optional_infos') }}
        </label>

and

    <label class="col-md-3 control-label"></label> 
        <div class="col-md-2 col-sm-2 text-left form-check" style="z-index:2;">   
        <input class="form-check-input" type="checkbox" id="order_info" name="options[]" value="order" <?php if (!empty (json_decode(Cookie::get('optional_info')))) {if(in_array('order',json_decode(Cookie::get('optional_info')))) {echo 'checked';} else {echo 'unchecked';}} else {echo 'unchecked';} ?>>
        <label class="form-check-label" for="order_info">
        {{ trans('admin/hardware/form.order_details') }}
    </label>

respectively... sorry about that. but I don't think there's any impact in the behavior

@snipe
Copy link
Owner

snipe commented Jun 27, 2022

I've reworked this a bit anyhow, so I don't think it will matter when I'm done. (I'm switching it to disclosure arrows instead of checkboxes)

Screen.Recording.2022-06-27.at.10.48.42.AM.mov

@veenone
Copy link
Contributor Author

veenone commented Jun 28, 2022

It looks waaay better 👍
In fact I just updated my local instance to the latest version and this piece already there 😄

@snipe
Copy link
Owner

snipe commented Jun 28, 2022

Glad you dig the tweaks! It's also added to the user's screen for lesser used options as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants