Addepar / Addepar/ember-table

Best practice for formatting cells

Open
#591 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
351
Avg merge
1d 22h
Merged PRs (30d)
1

Description

Hi,

I need to perform some minor formatting on my data before outputting the cell contents. For example I need to write timestamps in a more compact form, output numbers in engineering format, etc... without the need to instantiate a fully fledged component...

To me the proper place would be in the template, however I find it difficult to case/switch within the cell component (also because of handlebars lack of such constructs).

How would approach this kind of situations? Would you still use a custom component to render the cell?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review ember-table's cell rendering and template usage to determine how formatting is currently handled. Compare the requested timestamp and engineering-number formatting with the limitation around conditional logic in Handlebars. Done would be a documented, agreed-upon approach for formatting cell contents without requiring a fully fledged custom component.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.