Skip to content

fix: put unassigned review assignment contols on one small line#3780

Merged
jennifer-richards merged 2 commits into
ietf-tools:feat/bs5from
rjsparks:review-assignment
Apr 6, 2022
Merged

fix: put unassigned review assignment contols on one small line#3780
jennifer-richards merged 2 commits into
ietf-tools:feat/bs5from
rjsparks:review-assignment

Conversation

@rjsparks

@rjsparks rjsparks commented Apr 4, 2022

Copy link
Copy Markdown
Member

No description provided.

@rjsparks

rjsparks commented Apr 4, 2022

Copy link
Copy Markdown
Member Author

Be great if Lars can review this short one as it's all about tweaking how the form uses bootstrap5

@codecov

codecov Bot commented Apr 4, 2022

Copy link
Copy Markdown

Codecov Report

Merging #3780 (7495461) into feat/bs5 (8bd4851) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           feat/bs5    #3780      +/-   ##
============================================
- Coverage     87.97%   87.97%   -0.01%     
============================================
  Files           296      296              
  Lines         38795    38795              
============================================
- Hits          34130    34129       -1     
- Misses         4665     4666       +1     
Impacted Files Coverage Δ
ietf/doc/templatetags/ietf_filters.py 80.96% <0.00%> (-0.29%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3865c4b...7495461. Read the comment docs.

@jennifer-richards jennifer-richards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. One minor tweak suggested inline.

The "Close" button opens a similar set of fields. Should those receive the same single-row treatment? (Don't recall whether they were single row in the bs3 implementation.)

{% endif %}
{% bootstrap_field r.form.reviewer layout="horizontal" size="sm" %}
{% bootstrap_field r.form.add_skip layout="horizontal" size="sm" %}
{% bootstrap_field r.form.reviewer layout="horizontal" wrapper_class="col row" size="sm" %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the row in the wrapper_class is redundant with the layout="horizontal".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't, though I agree it should perhaps have worked, but there are (I'm guessing) interactions with the fluid form classes (row and col) that defeat what layout='horizontal' does by itself.
To be clear - layout='horizontal' was already present, and was insufficient, even after adding "col".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - the 'close' form is one line on main, but I think having it take more than one line makes sense - it's not used quite as often, and it makes more sense for the reason field to take some space.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the code as committed to the branch, the rendered output looks like:

<div class="reviewer-controls mx-1 flex-fill row">
    <div class="row col">
        <label class="col-md-2 fw-bold col-form-label" for="id_rtelechat-draft-ietf-httpapi-linkset-reviewer">Assign reviewer</label>
        <div class="col-md-10">
            <select name="rtelechat-draft-ietf-httpapi-linkset-reviewer" class="form-select form-select-sm" id="id_rtelechat-draft-ietf-httpapi-linkset-reviewer">

Note the "row col" class on the second <div>. If I drop the "row" from the wrapper_class in the template, I get:

 <div class="reviewer-controls mx-1 flex-fill row">
    <div class="row col">
        <label class="col-md-2 fw-bold col-form-label" for="id_rtelechat-draft-ietf-httpapi-linkset-reviewer">Assign reviewer</label>
        <div class="col-md-10">
            <select name="rtelechat-draft-ietf-httpapi-linkset-reviewer" class="form-select form-select-sm" id="id_rtelechat-draft-ietf-httpapi-linkset-reviewer">

There's still a "row col". I diffed the page sources and only the CSRF token had changed. If I add a fake class in place of the row I see it in the output, so I'm pretty sure my change is being picked up.

Am I doing something wrong?

@jennifer-richards jennifer-richards merged commit 6867b1b into ietf-tools:feat/bs5 Apr 6, 2022
@rjsparks rjsparks deleted the review-assignment branch April 6, 2022 23:12
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants