Merge branch 'develop' into feature/autocomplete-tags

This commit is contained in:
Antonella Sgarlatta
2021-06-03 18:52:27 -03:00
2 changed files with 10 additions and 10 deletions

View File

@@ -68,11 +68,11 @@ export const NotesOptions = observer(
const buttonRect = tagsButtonRef.current.getBoundingClientRect(); const buttonRect = tagsButtonRef.current.getBoundingClientRect();
const footerHeight = 32; const footerHeight = 32;
if ((buttonRect.top + maxTagsMenuSize) > (clientHeight - footerHeight)) { if (buttonRect.top + maxTagsMenuSize > clientHeight - footerHeight) {
setTagsMenuMaxHeight(clientHeight - buttonRect.top - footerHeight - 2); setTagsMenuMaxHeight(clientHeight - buttonRect.top - footerHeight - 2);
} }
if ((buttonRect.right + maxTagsMenuSize) > clientWidth) { if (buttonRect.right + maxTagsMenuSize > clientWidth) {
setTagsMenuPosition({ setTagsMenuPosition({
top: buttonRect.top, top: buttonRect.top,
right: clientWidth - buttonRect.left, right: clientWidth - buttonRect.left,
@@ -84,7 +84,6 @@ export const NotesOptions = observer(
}); });
} }
setTagsMenuOpen(!tagsMenuOpen); setTagsMenuOpen(!tagsMenuOpen);
}; };
@@ -165,7 +164,7 @@ export const NotesOptions = observer(
{appState.tags.tags.map((tag) => ( {appState.tags.tags.map((tag) => (
<button <button
key={tag.title} key={tag.title}
className="sn-dropdown-item sn-dropdown-item--no-icon" className="sn-dropdown-item sn-dropdown-item--no-icon max-w-80"
onBlur={closeOnBlur} onBlur={closeOnBlur}
onClick={() => { onClick={() => {
appState.notes.isTagInSelectedNotes(tag) appState.notes.isTagInSelectedNotes(tag)
@@ -174,11 +173,12 @@ export const NotesOptions = observer(
}} }}
> >
<span <span
className={ className={`whitespace-nowrap overflow-hidden overflow-ellipsis
appState.notes.isTagInSelectedNotes(tag) ${
? 'font-bold' appState.notes.isTagInSelectedNotes(tag)
: '' ? 'font-bold'
} : ''
}`}
> >
{tag.title} {tag.title}
</span> </span>

View File

@@ -87,7 +87,7 @@ Rails.application.configure do
config.i18n.fallbacks = true config.i18n.fallbacks = true
# Send deprecation notices to registered listeners. # Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify ActiveSupport::Deprecation.silenced = true
# Do not dump schema after migrations. # Do not dump schema after migrations.
# config.active_record.dump_schema_after_migration = false # config.active_record.dump_schema_after_migration = false