Replies: 2 comments
-
mt-selectHave proper opening and closing events for the result-list. This would allow better asynchronous fetches and resets. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback! This is very much appreciated. We're well aware of some issues like the modularity. We have plans for the future to improve three-shaking and only outputting the styles for the components that are actually imported. Regarding the flexibility we try to strive for a balance. We want the components to be flexible in a way that allows people to achieve the things their need to do but we also want to restrict certain things to have a sense of uniformity. I agree that some properties should be renamed or changed. Though we need to be careful not to break too many things as this makes it harder to adopt Meteor in some projects where a big migration could bring development to a hold. |
Beta Was this translation helpful? Give feedback.
-
I have now used the component library several times to build various apps and would like to share my opinions, ideas and thoughts about it.
My feedback is based on my own experience of building Vue applications using external libraries such as NaiveUI, Vuetify and internal ones.
Note that the following is purely my opinion, and while I use phrases like "should", all points are open to discussion.
To give this a bit of structure, I would like to start with the criteria on which my feedback is based:
Modularity
A library's components should be self-contained to allow for optimal bundle size.
Flexibility
A library's components should not feel constrained in their capabilities. Being too fixed could lead to self-developing components, resulting in higher maintenance and less consistent styles.
Therefore, a component should make use of slots to cover most use cases, and also ensure that HTML elements and customisations are left in the
template
block, rather than being defined alongside your data.Uniformity of API / prop naming
Props, along with slots, are the way to interact with components. Having a consistent way of naming props greatly improves the learning curve, usability and developer experience of the library.
Many components have a mixture of
disable-
/enable-
andhide-
/show-
props. Often these are used to indicate what the default value of that prop is, e.g.disable-
if it's enabled by default. Default values can/will change, and I would prefer to have a consistent prop naming convention instead.Looking through the existing components, I would like to point out the following criteria:
model-value
wherever the state of a component is managed by one valuevariant
to change the appearance of a componentsize
to change the size of a componentshow
prefix to show/hide something visuallyenable
prefix or adjectives (..able
) to enable/disable a feature of the component. Ideally, only one pattern is usedupdate:<prop-name>
to update prop values to properly match Vue's intentions, Dev's general expectations, and to allow the use ofv-model
and it's modifierscustom
.Data/Form components
model-value
,label
,name
,error
,disabled
,help-text
,required
, etc.Feedback about the components
mt-banner
hide-icon
should beshow-icon
custom-icon
should beicon
mt-progress-bar
progress-label-type
says "percentage" instead of "percent"mt-checkbox
checked
should bemodel-value
mt-select
hide-clearable-button
should beshow-clearable-button
small
should besize
and properly not a booleanThis component has some performance overhead on large static datasets (> 1000, depending on your system), as each option is prepended in Vue's virtual DOM. Perhaps something like Vuetify's
v-lazy
might be interesting to implement.mt-textarea
max-length
is set, the character counter is not changing onchange
butblur
mt-card
large
should besize
and properly not a booleanmt-empty-state
buttons
,headline
anddescription
mt-card
, title and subtitle are namedheadline
anddescription
mt-tabs
small
should besize
and properly not a booleanmodel-value
nor aupdate:model-value
event but insteaddefault-item
andnew-item-active
mt-modal
<Teleport>
mt-card
, this component is rather limited and could make great use of additional slots likeavatar
,header-right
/title-before
width
should be namedsize
mt-popover
disable-flow
should beenable-float
orfloatable
update:is-opened
event but nois-opened
propmt-paginiation
mt-data-table
A data table is properly the hardest to be done nicely in a component library. The current implementation is almost well done. One thing that pops right out is that it's not capable of managing any state by its own. By default, the search bar and settings pop over are enabled, but both aren't functional as long as no prop is bound.
disable-settings-table
doesn't prohibit the hide of a column → once hidden, a column cannot be made visible againsearch-value
should be namedsearch-term
disable-search
should beenable-search
orsearchable
allow-row-selection
should beenable-row-selection
orrows-selectable
allow-bulk-edit
should beenable-bulk-edit
orbulk-editable
allow-bulk-delete
should beenable-bulk-delete
orbulk-deletable
enable-outline-framing
should beshow-outline-framing
enable-row-numbering
should beshow-row-numbering
disable-edit
should beenable-edit
oreditable
disable-delete
should beenable-delete
ordeletable
disable-settings-table
should beenable-settings-table
current-page
should bepagination-page
to be inline withpagination-limit
andpagination-total-items
and it's eventpagination-current-page-change
pagination-limit-change
should beupdate:pagination-limit
pagination-current-page-change
should beupdate:pagination-page
sort-change
should beupdate:sort
search-value-change
should beupdate:search-value
open-details
should beitem-edit
to be inline withitem-delete
change-show-outlines
should beupdate:show-outlines
change-show-stripes
should beupdate:show-stripes
change-outline-framing
should beupdate:enable-outline-framing
change-enable-row-numbering
should beupdate:enable-row-numbering
Beta Was this translation helpful? Give feedback.
All reactions