Skip to content

Commit

Permalink
PRJ-55 - Post form privacy UI and functionality update
Browse files Browse the repository at this point in the history
  • Loading branch information
amincdev committed Jan 24, 2025
1 parent 17f119d commit 12126b7
Show file tree
Hide file tree
Showing 16 changed files with 713 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'parts/bp-editor-toolbar',
'parts/bp-activity-post-form-privacy',
'parts/bp-activity-edit-postin',
'parts/bp-activity-edit-postin-header',
'parts/bp-activity-post-privacy-stage-footer',
)
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* ReadyLaunch - The template for displaying activity group privacy header.
*
* @since BuddyBoss [BBVERSION]
* @version 1.0.0
*/

?>
<script type="text/html" id="tmpl-activity-edit-postin-header">
<h3>
<span class="activity-header-data">
<?php esc_html_e( 'Select a group', 'buddyboss' ); ?>
<span>
</h3>
<a class="bb-rl-model-close-button" href="#">
<span class="bb-icons-rl-x"></span>
</a>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
?>
<script type="text/html" id="tmpl-activity-post-privacy-stage-footer">
<div class="bb-rl-privacy-status-actions">
<input type="button" id="bb-rl-privacy-status-back" class="text-button small" value="<?php esc_html_e( 'Back', 'buddyboss' ); ?>">
<input type="button" id="bb-rl-privacy-status-group-back" class="text-button small" value="<?php esc_html_e( 'Back', 'buddyboss' ); ?>">
<input type="submit" id="bb-rl-privacy-status-submit" class="button" name="bb-rl-privacy-status-submit" value="<?php esc_html_e( 'Save', 'buddyboss' ); ?>">
<input type="button" id="bb-rl-privacy-status-back" class="bb-rl-button bb-rl-button--secondaryFill" value="<?php esc_html_e( 'Back', 'buddyboss' ); ?>">
<input type="button" id="bb-rl-privacy-status-group-back" class="bb-rl-button bb-rl-button--secondaryFill" value="<?php esc_html_e( 'Back', 'buddyboss' ); ?>">
<input type="submit" id="bb-rl-privacy-status-submit" class="bb-rl-button bb-rl-button--brandFill" name="bb-rl-privacy-status-submit" value="<?php esc_html_e( 'Save and Continue', 'buddyboss' ); ?>">
</div>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
?>
<script type="text/html" id="tmpl-activity-target-item">
<label for="bb-rl-item-opt-{{data.id}}">
<span class="bb-rl-radio-style bb-rl-privacy-radio <# if ( data.selected ) { #>selected<# } #>">
<input type="radio" id="bb-rl-item-opt-{{data.id}}" class="bb-rl-activity-object__radio" name="group-privacy" data-title="{{data.name}}" data-id="{{data.id}}" <# if ( data.allow_schedule ) { #> data-allow-schedule-post="{{data.allow_schedule}}" <# } #> <# if ( data.allow_polls ) { #> data-allow-polls="{{data.allow_polls}}" <# } #> value="opt-value-{{data.id}}" <# if ( data.selected ) { #> checked <# } #>><span></span>
</span>
<# if ( data.selected ) { #>
<input type="hidden" value="{{data.id}}">
<# } #>
Expand All @@ -18,9 +21,5 @@
<# } #>

<span class="bp-item-name">{{data.name}}</span>

<span class="bb-rl-radio-style bb-rl-privacy-radio <# if ( data.selected ) { #>selected<# } #>">
<input type="radio" id="bb-rl-item-opt-{{data.id}}" class="bb-rl-activity-object__radio" name="group-privacy" data-title="{{data.name}}" data-id="{{data.id}}" <# if ( data.allow_schedule ) { #> data-allow-schedule-post="{{data.allow_schedule}}" <# } #> <# if ( data.allow_polls ) { #> data-allow-polls="{{data.allow_polls}}" <# } #> value="opt-value-{{data.id}}" <# if ( data.selected ) { #> checked <# } #>><span></span>
</span>
</label>
</script>
165 changes: 165 additions & 0 deletions src/bp-templates/bp-nouveau/readylaunch/css/activity-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,171 @@
border: 0;
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in {
display: none;
}

.bb-rl-activity-form.bb-rl-focus-in--group .bb-rl-whats-new-post-in-box-header {
display: flex;
border-bottom: 1px solid var(--bb-rl-border-secondary-color);
padding: var(--bb-rl-space-200) var(--bb-rl-space-300);
margin: 0;
}

.bb-rl-activity-form.bb-rl-focus-in--group .bb-rl-whats-new-post-in-box-header h3 {
color: var(--bb-rl-text-color);
font-size: 18px;
font-weight: 600;
line-height: 1.5;
}

.bb-rl-activity-form.bb-rl-focus-in--group .bb-rl-whats-new-post-in-box-header .bb-rl-model-close-button {
margin-right: auto;
line-height: 1;
}

.bb-rl-activity-form.bb-rl-focus-in--group .bb-rl-whats-new-post-in-box-header .bb-rl-model-close-button span {
color: var(--bb-rl-icon-color);
font-size: var(--bb-rl-base-line);
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box {
display: block;
position: fixed;
z-index: var(--bb-rl-z-index-modal);
top: 50%;
right: 50%;
transform: translate(50%, -50%);
width: 720px;
max-width: 90%;
background-color: var(--bb-rl-background-color);
border-radius: var(--bb-rl-radius-lg);
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box #bb-rl-activity-group-ac-items {
min-height: 130px;
max-height: calc(100vh - 300px);
overflow: auto;
padding: var(--bb-rl-space-100) 0;
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .bb-rl-activity-object label {
display: flex;
align-items: center;
padding: var(--bb-rl-space-100) var(--bb-rl-space-300);
cursor: pointer;
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .bb-rl-activity-object label:hover {
background-color: var(--bb-rl-background-secondary-hover-color);
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .bb-rl-activity-object .bb-rl-radio-style {
height: auto;
width: auto;
visibility: visible;
opacity: 1;
margin-left: var(--bb-rl-space-300);
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .bb-rl-activity-object .avatar {
height: 40px;
width: 40px;
border-radius: var(--bb-rl-radius-md);
margin-left: var(--bb-rl-space-200);
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .bb-rl-activity-object .bp-item-name {
color: var(--bb-rl-text-color);
font-size: 15px;
font-weight: 500;
line-height: 1.6;
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .bb-rl-privacy-status-form-footer {
display: block;
visibility: visible;
opacity: 1;
height: auto;
width: auto;
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .bb-rl-privacy-status-actions {
display: flex;
justify-content: flex-end;
align-items: center;
padding: var(--bb-rl-space-200) var(--bb-rl-space-300);
border-top: 1px solid var(--bb-rl-border-secondary-color);
gap: var(--bb-rl-space-100);
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .activity-autocomplete-wrapper {
display: flex;
padding: var(--bb-rl-space-200) var(--bb-rl-space-300);
position: relative;
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .activity-autocomplete-wrapper:before {
content: "\e30c";
font-family: bb-icons-rl;
font-size: 20px;
color: var(--bb-rl-icon-secondary-color);
position: absolute;
top: 50%;
right: var(--bb-rl-space-400);
transform: translateY(-50%);
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .activity-autocomplete-wrapper input {
color: var(--bb-rl-text-tertiary-color);
font-size: 14px;
padding: var(--bb-rl-space-100) var(--bb-rl-space-400) var(--bb-rl-space-100);
width: 100%;
border: 1px solid var(--bb-rl-border-tertiary-color);
border-radius: var(--bb-rl-radius-md);
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .activity-autocomplete-wrapper .activity-autocomplete-clear {
position: absolute;
top: 50%;
left: var(--bb-rl-space-400);
transform: translate(0, -50%);
z-index: 6;
width: 20px;
height: 20px;
cursor: pointer;
display: none;
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .activity-autocomplete-wrapper .activity-autocomplete-clear i {
display: block;
font-size: 20px;
color: var(--bb-rl-icon-secondary-color);
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box #bb-rl-privacy-status-back {
display: none;
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-whats-new-post-in-box .activity-is-autocomplete .activity-autocomplete-clear {
display: inline-block;
}

.bb-rl-activity-form.bb-rl-focus-in--group #bb-rl-activity-post-form-privacy {
display: none;
}

.bb-rl-activity-form.bb-rl-focus-in--group .groups-selection {
display: flex;
align-items: center;
gap: var(--bb-rl-space-100);
font-size: 0.9rem;
color: var(--bb-rl-text-secondary-color);
font-weight: 500;
justify-content: center;
margin: var(--bb-rl-space-100) 0;
}

.bb-rl-activity-form .bb-rl-activity-privacy-stage {
background-color: var(--bb-rl-background-color);
border-radius: var(--bb-rl-radius-md);
Expand Down
Loading

0 comments on commit 12126b7

Please sign in to comment.