Problem with BetaCheckbox in smart views

Feature(s) impacted

BetaCheckbox in smart views

Observed behavior

I was building a smart view and it was working as expected until I come back a few hours later yesterday.
It seems that <BetaCheckbox /> is no longer working and I’ve got some weird comportement after saving when I try to modify code inside smart view builder. After saving I can no longer type code, it doesn’t work. (it may take a few save)

Expected behavior

Render of <BetaCheckbox /> and ability to modify after saving modification inside smart view builder.

Failure Logs

I’ve made a new smart view to demonstrate this. I’m sharing the code below in context section. Here is the failure logs inside my browser console when I load smart view builder.

Context

  • Project name: mytraiteur
  • Team name: Operations
  • Environment name: Development | marco2
  • Agent type & version:
    • forest-express-sequelize version: 8.5.3
    • express version: 4.17.1
    • sequelize version: 5.15.1

I create a new smart view to show this behavior (it doesn’t display anything if there is the checkbox and it works without it). I only added <BetaCheckbox /> so I’ve got this :

Template

<div class="c-smart-view">
  <div class="c-smart-view__content">
    <span class="c-smart-view_icon">{{@collection.iconOrDefault}}</span>
    <h1>
      {{@collection.pluralizedDisplayName}}
      ({{@recordsCount}})
    </h1>
    <p>
      You can now implement your Smart View.
      <BetaCheckbox @value={{true}} @small={{true}} @disabled={{false}} />
    </p>
  </div>
</div>

Component

import Component from '@glimmer/component';
import { action } from '@ember/object';
import { triggerSmartAction, deleteRecords, getCollectionId, loadExternalStyle, loadExternalJavascript } from 'client/utils/smart-view-utils';

export default class extends Component {
  @action
  triggerSmartAction(...args) {
    return triggerSmartAction(this, ...args);
  }

  @action
  deleteRecords(...args) {
    return deleteRecords(this, ...args);
  }
}

Style

.c-smart-view {
  display: flex;
  white-space: normal;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background-color: var(--color-beta-surface);
}

.c-smart-view__content {
  margin: auto;
  text-align: center;
  color: var(--color-beta-on-surface_medium);
}

.c-smart-view_icon {
  margin-bottom: 32px;
  font-size: 32px;
}

Thanks in advance

Hi @MarcoGarcia,

You can fix your issue by replacing BetaCheckbox by Form::BetaCheckbox.

Let me know if it works for you :pray:

Hello @vince,
yes it’s working now thanks.

BetaCheckbox is no longer supported ?

It has been renamed. Sorry about that, I will make sure all smart views are migrated :pray:

1 Like